ID: 39903 Updated by: [EMAIL PROTECTED] Reported By: francois at tekwire dot net -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: All PHP Version: 5.2.0 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. A more meaningful error message added. Previous Comments: ------------------------------------------------------------------------ [2006-12-20 14:36:55] francois at tekwire dot net Description: ------------ When __halt_compiler() is seen for the second time, PHP displays a message saying: Notice: Constant __COMPILER_HALT_OFFSET__ already defined in ... Although it cannot happen in a single file, it can happen when including two files containing an __halt_compiler() directive. The constant should be undefined before calling REGISTER_MAIN_LONG_CONSTANT("__C OMPILER_HALT_OFFSET__", zend_get_scanned_file_offset(TSRMLS_C), CONST_CS) in zend_language_parser.y but I haven't found any function to undefine a constant... Reproduce code: --------------- * File a.php contains : <?php include 'b.php'; include 'c.php'; * File b.php and c.php both contain : <?php echo __FILE__."\n"; __halt_compiler(); data * Run a.php Expected result: ---------------- /depot/divers/flp/tmp/b.php /depot/divers/flp/tmp/c.php Actual result: -------------- /depot/divers/flp/tmp/b.php Notice: Constant __COMPILER_HALT_OFFSET__ already defined in /depot/divers/flp/tmp/c.php on line 3 /depot/divers/flp/tmp/c.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39903&edit=1
