ID: 46077 Updated by: [EMAIL PROTECTED] Reported By: atomo64 at gmail dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Debian sid PHP Version: 5.2.6 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 error is emitted during complication but you'Re changing the error handling at run-time, try php -derror_reporting=E_STRICT or set php.ini accordingly Previous Comments: ------------------------------------------------------------------------ [2008-09-14 19:14:03] atomo64 at gmail dot com Description: ------------ [This is http://bugs.debian.org/498914] When a class has two constructors (__constructor, and a method named after the class) E_STRICT only produces a warning when the file defining the class is included/required but not when file is executed directly. Reproduce code: --------------- file foo.php: <?php error_reporting(E_STRICT); class foo { function __construct() {} function foo() {} } ?> file bar.php: <?php error_reporting(E_STRICT); require('foo.php'); ?> $ php -n foo.php; echo ---; php -n bar.php Expected result: ---------------- Strict Standards: Redefining already defined constructor for class foo in /tmp/foo.php on line 6 --- Strict Standards: Redefining already defined constructor for class foo in /tmp/foo.php on line 6 Actual result: -------------- --- Strict Standards: Redefining already defined constructor for class foo in /tmp/foo.php on line 6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46077&edit=1
