#30976 [Opn->Fbk]: Static method call, warning generated, correct output
| From: | tony2001@php.net | Date: | Fri, 03 Dec 2004 15:05:42 +0000 |
| Subject: | #30976 [Opn->Fbk]: Static method call, warning generated, correct output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69773@lists.php.net to get a copy of this message | ||
ID: 30976
Updated by: tony2001@php.net
Reported By: php at pollensoft dot com
-Status: Open
+Status: Feedback
-Bug Type: Compile Warning
+Bug Type: Scripting Engine problem
Operating System: Win2k
PHP Version: 4.3.9
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-12-03 15:57:21] php at pollensoft dot com
sorry, actual result should say:
Warning: Problem with method call - please report this bug in <path to
file> on line <line number>
constructor
staticMethod
------------------------------------------------------------------------
[2004-12-03 15:56:24] php at pollensoft dot com
Description:
------------
Calling a static method, ie:
ClassName::staticMethod();
Generates the following error:
Warning: Problem with method call - please report this bug in <path to
file> on line <line number>
The output is correct, the method seems to function normally, but the
warning is generated.
This happens with any static method call. I think the warning just
needs to be removed unless there's something really low level that's
going on that not affecting code compilation or runtime.
Reproduce code:
---------------
<?
class tmp {
function tmp() {
echo "constructor";
}
function staticMethod() {
echo "staticMethod";
}
}
$t = new tmp();
tmp::staticMethod();
?>
Expected result:
----------------
constructor
staticMethod
Actual result:
--------------
constructor
staticMethod
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30976&edit=1