]> granicus.if.org Git - php/commitdiff
Fixed bug #70931 (Two errors messages are in conflict)
authorXinchen Hui <laruence@gmail.com>
Sun, 29 Nov 2015 07:43:41 +0000 (23:43 -0800)
committerXinchen Hui <laruence@gmail.com>
Sun, 29 Nov 2015 07:43:41 +0000 (23:43 -0800)
NEWS
Zend/tests/ns_068.phpt
Zend/tests/ns_083.phpt
Zend/zend_compile.c

diff --git a/NEWS b/NEWS
index 5d7a185d33fd89deb83d5c0d222909cec8137dba..973b9552f95bed0a9f73e3eac13e4166dc18e1f6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ PHP                                                                        NEWS
     paramater default value). (Laruence)
   . Fixed bug #70944 (try{ } finally{} can create infinite chains of
     exceptions). (Laruence)
+  . Fixed bug #70931 (Two errors messages are in conflict). (dams, Laruence)
   . Fixed bug #70899 (buildconf failure in extensions). (Bob, Reeze)
   . Fixed bug #61751 (SAPI build problem on AIX: Undefined symbol:
     php_register_internal_extensions). (Lior Kaplan)
index 97e43568e5281a2bcd720ade696604f23b1e2eae..b6dc258fd3a3f40b632ca8762aee8526fdc4bc49 100644 (file)
@@ -11,4 +11,4 @@ echo __NAMESPACE__ . "\n";
 ===DONE===
 --EXPECTF--
 
-Fatal error: Namespace declaration statement has to be the very first statement in the script in %sns_068.php on line %d
+Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %sns_068.php on line %d
index 4b821dbf0b5ba0f850818b397cec00e3a2c25e35..350b33559011eea03f32783e6f467ddd733c2680 100644 (file)
@@ -11,4 +11,4 @@ echo "ok\n";
 }
 ?>
 --EXPECTF--
-Fatal error: Namespace declaration statement has to be the very first statement in the script in %s on line %d
+Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %sns_083.php on line %d
index 0e633b724a59859dbf7500632de2349ac38358e9..da4b051c4c5990e9e3d82f67cbd6f2ae5afd4c3b 100644 (file)
@@ -5635,7 +5635,7 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */
                }
                if (num > 0) {
                        zend_error_noreturn(E_COMPILE_ERROR, "Namespace declaration statement has to be "
-                               "the very first statement in the script");
+                               "the very first statement or after any declare call in the script");
                }
        }