From 1101293b3f78254cddc4492ef8e1216e9d1364b2 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 19 May 2011 23:20:47 +0000 Subject: [PATCH] - Fixed bug #54804 (__halt_compiler and imported namespaces) (Pierrick) --- Zend/tests/bug54804.inc | 3 +++ Zend/tests/bug54804.phpt | 11 +++++++++++ Zend/zend_compile.c | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 Zend/tests/bug54804.inc create mode 100644 Zend/tests/bug54804.phpt diff --git a/Zend/tests/bug54804.inc b/Zend/tests/bug54804.inc new file mode 100644 index 00000000000..74b7a1681d5 --- /dev/null +++ b/Zend/tests/bug54804.inc @@ -0,0 +1,3 @@ + +--EXPECT-- +DONE diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 5c6778f6ca5..a3f38d572c9 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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); + } } /* }}} */