com php-src: Fixed bug #70931 (Two errors messages are in conflict): NEWS Zend/tests/ns_068.phpt Zend/tests/ns_083. phpt Zend/zend_compile.c
| From: | Xinchen Hui | Date: | Sun, 29 Nov 2015 07:43:41 +0000 |
| Subject: | com php-src: Fixed bug #70931 (Two errors messages are in conflict): NEWS Zend/tests/ns_068.phpt Zend/tests/ns_083. phpt Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90053@lists.php.net to get a copy of this message | ||
Commit: 1f65006fce2357d80f6ea29c4527e634450a6893
Author: Xinchen Hui <laruence@gmail.com> Sat, 28 Nov 2015 23:43:41 -0800
Parents: 9397f527248a948e4d3929adb119e7e3519ce5b8
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1f65006fce2357d80f6ea29c4527e634450a6893
Log:
Fixed bug #70931 (Two errors messages are in conflict)
Bugs:
https://bugs.php.net/70931
Changed paths:
M NEWS
M Zend/tests/ns_068.phpt
M Zend/tests/ns_083.phpt
M Zend/zend_compile.c
Diff:
diff --git a/NEWS b/NEWS
index 5d7a185..973b955 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 97e4356..b6dc258 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 4b821dbf..350b335 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 0e633b7..da4b051 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");
}
}