ID: 39903 User updated by: francois at tekwire dot net Reported By: francois at tekwire dot net Status: Closed Bug Type: Scripting Engine problem Operating System: All PHP Version: 5.2.0 New Comment:
For the ones interested, the issue was fixed by Greg's patch in 5.2.2. Previous Comments: ------------------------------------------------------------------------ [2007-02-07 06:29:30] [EMAIL PROTECTED] A better fix for this bug is in: http://news.php.net/php.internals/27872 ------------------------------------------------------------------------ [2006-12-20 16:31:28] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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