felipe Thu, 19 May 2011 23:20:47 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311276
Log: - Fixed bug #54804 (__halt_compiler and imported namespaces) (Pierrick) Bug: http://bugs.php.net/54804 (Assigned) __halt_compiler and imported namespaces Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug54804.inc A php/php-src/branches/PHP_5_3/Zend/tests/bug54804.phpt U php/php-src/branches/PHP_5_3/Zend/zend_compile.c A php/php-src/branches/PHP_5_4/Zend/tests/bug54804.inc A php/php-src/branches/PHP_5_4/Zend/tests/bug54804.phpt U php/php-src/branches/PHP_5_4/Zend/zend_compile.c A php/php-src/trunk/Zend/tests/bug54804.inc A php/php-src/trunk/Zend/tests/bug54804.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2011-05-19 23:18:55 UTC (rev 311275) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-19 23:20:47 UTC (rev 311276) @@ -5,6 +5,8 @@ - Upgraded bundled PCRE to version 8.12. (Scott) - Zend Engine: + . Fixed bug #54804 (__halt_compiler and imported namespaces). + (Pierrick, Felipe) . Fixed bug #54585 (track_errors causes segfault). (Dmitry) . Fixed bug #54423 (classes from dl()'ed extensions are not destroyed). (Tony, Dmitry) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54804.inc =================================================================== --- php/php-src/branches/PHP_5_3/Zend/tests/bug54804.inc (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54804.inc 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,3 @@ +<?php +namespace b\c {} +namespace b\d {} Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54804.phpt =================================================================== --- php/php-src/branches/PHP_5_3/Zend/tests/bug54804.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54804.phpt 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,11 @@ +--TEST-- +Bug #54804 (__halt_compiler and imported namespaces) +--FILE-- +<?php +namespace a; +require __DIR__ . '/bug54804.inc'; +echo 'DONE'; +__halt_compiler(); +?> +--EXPECT-- +DONE Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c =================================================================== --- php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-05-19 23:18:55 UTC (rev 311275) +++ php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-05-19 23:20:47 UTC (rev 311276) @@ -3749,6 +3749,10 @@ zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, cfilename, clen, 0); zend_register_long_constant(name, len+1, zend_get_scanned_file_offset(TSRMLS_C), CONST_CS, 0 TSRMLS_CC); pefree(name, 0); + + if (CG(in_namespace)) { + zend_do_end_namespace(TSRMLS_C); + } } /* }}} */ Added: php/php-src/branches/PHP_5_4/Zend/tests/bug54804.inc =================================================================== --- php/php-src/branches/PHP_5_4/Zend/tests/bug54804.inc (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug54804.inc 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,3 @@ +<?php +namespace b\c {} +namespace b\d {} Added: php/php-src/branches/PHP_5_4/Zend/tests/bug54804.phpt =================================================================== --- php/php-src/branches/PHP_5_4/Zend/tests/bug54804.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug54804.phpt 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,11 @@ +--TEST-- +Bug #54804 (__halt_compiler and imported namespaces) +--FILE-- +<?php +namespace a; +require __DIR__ . '/bug54804.inc'; +echo 'DONE'; +__halt_compiler(); +?> +--EXPECT-- +DONE Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-05-19 23:18:55 UTC (rev 311275) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-05-19 23:20:47 UTC (rev 311276) @@ -5020,6 +5020,10 @@ zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, cfilename, clen, 0); zend_register_long_constant(name, len+1, zend_get_scanned_file_offset(TSRMLS_C), CONST_CS, 0 TSRMLS_CC); pefree(name, 0); + + if (CG(in_namespace)) { + zend_do_end_namespace(TSRMLS_C); + } } /* }}} */ Added: php/php-src/trunk/Zend/tests/bug54804.inc =================================================================== --- php/php-src/trunk/Zend/tests/bug54804.inc (rev 0) +++ php/php-src/trunk/Zend/tests/bug54804.inc 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,3 @@ +<?php +namespace b\c {} +namespace b\d {} Added: php/php-src/trunk/Zend/tests/bug54804.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug54804.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug54804.phpt 2011-05-19 23:20:47 UTC (rev 311276) @@ -0,0 +1,11 @@ +--TEST-- +Bug #54804 (__halt_compiler and imported namespaces) +--FILE-- +<?php +namespace a; +require __DIR__ . '/bug54804.inc'; +echo 'DONE'; +__halt_compiler(); +?> +--EXPECT-- +DONE Modified: php/php-src/trunk/Zend/zend_compile.c =================================================================== --- php/php-src/trunk/Zend/zend_compile.c 2011-05-19 23:18:55 UTC (rev 311275) +++ php/php-src/trunk/Zend/zend_compile.c 2011-05-19 23:20:47 UTC (rev 311276) @@ -5020,6 +5020,10 @@ zend_mangle_property_name(&name, &len, haltoff, sizeof(haltoff) - 1, cfilename, clen, 0); zend_register_long_constant(name, len+1, zend_get_scanned_file_offset(TSRMLS_C), CONST_CS, 0 TSRMLS_CC); pefree(name, 0); + + if (CG(in_namespace)) { + zend_do_end_namespace(TSRMLS_C); + } } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php