ID: 47439 Updated by: johan...@php.net Reported By: tomek at realtsp dot com -Status: Open +Status: Bogus Bug Type: Compile Warning Operating System: FreeBSD 7.0, Ubuntu PHP Version: 5.2.9RC2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The "missing" messages are created at compile time, but you'Re setting your error_reporting level at run-time. Please set error reporting in php.ini to get all compile time messages Previous Comments: ------------------------------------------------------------------------ [2009-02-18 16:34:43] tomek at realtsp dot com Description: ------------ When running in CLI with strict errors enabled & display_errors turned on, PHP does not produce all strict warnings reliably. Some, like: "Strict Standards: Non-static method b::init() should not be called statically in /usr/home/tomek/test.php on line 25" is 100% reproducible. Others, like: "Strict Standards: Declaration of b::init() should be compatible with that of a::init() in /usr/home/tomek/test.php on line 8" are not reproducible using the code attached. Swapping the class declarations, however, makes the warning appear (ie. "class b extends a" goes first, and only then define "class a"). Please note that this is the *only* change required for it to appear. This is very similar to bug #46851. Reproduce code: --------------- <?php error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 'On'); ini_set('log_errors', 'Off'); class a { public function init($v) {} } class b extends a { public function init() {} } b::init(); Expected result: ---------------- Strict Standards: Declaration of b::init() should be compatible with that of a::init() in /usr/home/tomek/test.php on line 8 Strict Standards: Non-static method b::init() should not be called statically in /usr/home/tomek/test.php on line 19 Actual result: -------------- Strict Standards: Non-static method b::init() should not be called statically in /usr/home/tomek/test.php on line 19 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47439&edit=1