Bug #54804 [Asn->Csd]: __halt_compiler and imported namespaces
Edit report at http://bugs.php.net/bug.php?id=54804&edit=1
ID: 54804
Updated by: felipe@php.net
Reported by: vrai at moechofe dot com
Summary: __halt_compiler and imported namespaces
-Status: Assigned
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Ubuntu 11.01 2.6.38-8-generic
PHP Version: 5.3.6
Assigned To: pierrick
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-05-20 01:20:50] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=311276
Log: - Fixed bug #54804 (__halt_compiler and imported namespaces)
(Pierrick)
------------------------------------------------------------------------
[2011-05-19 13:04:30] pierrick@php.net
The following patch has been added/updated:
Patch Name: bug_54804_with_test.diff
Revision: 1305803069
URL:
http://bugs.php.net/patch-display.php?bug=54804&patch=bug_54804_with_test.diff&revision=1305803069
------------------------------------------------------------------------
[2011-05-19 12:57:15] pajoye@php.net
Can you add a test case please?
------------------------------------------------------------------------
[2011-05-19 12:46:34] pierrick@php.net
The following patch has been added/updated:
Patch Name: bug_54804
Revision: 1305801994
URL:
http://bugs.php.net/patch-display.php?bug=54804&patch=bug_54804&revision=1305801994
------------------------------------------------------------------------
[2011-05-18 09:58:15] vrai at moechofe dot com
Description:
------------
When importing namespace in a script using the __halt_compiler()
function, the imported script must use the same type of declaration
(bracketed namespace or unbracketed namespace).
Test script:
---------------
a.php
----
<?php
namespace a;
require_once 'b.php';
echo 'ok',PHP_EOL;
__halt_compiler(); // Remove this line and the script will works.
b.php
----
<?php
namespace b\c {}
namespace b\d {}
Expected result:
----------------
ok
Actual result:
--------------
Fatal error: Cannot mix bracketed namespace declarations with
unbracketed namespace declarations in b.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54804&edit=1
Thread (5 messages)