summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-28 23:43:41 -0800
committerXinchen Hui <laruence@gmail.com>2015-11-28 23:43:41 -0800
commit1f65006fce2357d80f6ea29c4527e634450a6893 (patch)
tree30bad404e9135b26b42f2414214b5cedfe03f7a4
parent9397f527248a948e4d3929adb119e7e3519ce5b8 (diff)
downloadphp-git-1f65006fce2357d80f6ea29c4527e634450a6893.tar.gz
Fixed bug #70931 (Two errors messages are in conflict)
-rw-r--r--NEWS1
-rw-r--r--Zend/tests/ns_068.phpt2
-rw-r--r--Zend/tests/ns_083.phpt2
-rw-r--r--Zend/zend_compile.c2
4 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 5d7a185d33..973b9552f9 100644
--- 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)
diff --git a/Zend/tests/ns_068.phpt b/Zend/tests/ns_068.phpt
index 97e43568e5..b6dc258fd3 100644
--- a/Zend/tests/ns_068.phpt
+++ b/Zend/tests/ns_068.phpt
@@ -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
diff --git a/Zend/tests/ns_083.phpt b/Zend/tests/ns_083.phpt
index 4b821dbf0b..350b335590 100644
--- a/Zend/tests/ns_083.phpt
+++ b/Zend/tests/ns_083.phpt
@@ -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
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 0e633b724a..da4b051c4c 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -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");
}
}