- Fixed bug #54804 (__halt_compiler and imported namespaces) (Pierrick)

This commit is contained in:
Felipe Pena 2011-05-19 23:20:47 +00:00
parent 4ad9f1970c
commit 1101293b3f
3 changed files with 18 additions and 0 deletions

3
Zend/tests/bug54804.inc Normal file
View File

@ -0,0 +1,3 @@
<?php
namespace b\c {}
namespace b\d {}

11
Zend/tests/bug54804.phpt Normal file
View 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

View File

@ -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);
}
}
/* }}} */