|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch bug_54804_with_test.diff for Scripting Engine problem Bug #54804Patch version 2011-05-19 11:04 UTC Return to Bug #54804 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: pierrick@php.net
Index: Zend/zend_compile.c
===================================================================
--- Zend/zend_compile.c (revision 311143)
+++ Zend/zend_compile.c (working copy)
@@ -3746,6 +3746,9 @@
int len, clen;
cfilename = zend_get_compiled_filename(TSRMLS_C);
clen = strlen(cfilename);
+ if (CG(in_namespace) && !CG(has_bracketed_namespaces)) {
+ zend_do_end_namespace(TSRMLS_C);
+ }
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);
Index: Zend/tests/bug54804.inc
===================================================================
--- Zend/tests/bug54804.inc (revision 0)
+++ Zend/tests/bug54804.inc (revision 0)
@@ -0,0 +1,3 @@
+<?php
+namespace b\c {}
+namespace b\d {}
Index: Zend/tests/bug54804.phpt
===================================================================
--- Zend/tests/bug54804.phpt (revision 0)
+++ Zend/tests/bug54804.phpt (revision 0)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #54804 ()
+--FILE--
+<?php
+namespace a;
+require __DIR__ . '/bug54804.inc';
+echo 'DONE';
+__halt_compiler();
+?>
+--EXPECT--
+DONE
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 16:00:01 2025 UTC |