mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
- Fixed bug #54804 (__halt_compiler and imported namespaces) (Pierrick)
This commit is contained in:
parent
4ad9f1970c
commit
1101293b3f
3
Zend/tests/bug54804.inc
Normal file
3
Zend/tests/bug54804.inc
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
namespace b\c {}
|
||||
namespace b\d {}
|
11
Zend/tests/bug54804.phpt
Normal file
11
Zend/tests/bug54804.phpt
Normal file
@ -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
|
@ -5020,6 +5020,10 @@ void zend_do_halt_compiler_register(TSRMLS_D) /* {{{ */
|
||||
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);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user