From 1f65006fce2357d80f6ea29c4527e634450a6893 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 28 Nov 2015 23:43:41 -0800 Subject: [PATCH] Fixed bug #70931 (Two errors messages are in conflict) --- NEWS | 1 + Zend/tests/ns_068.phpt | 2 +- Zend/tests/ns_083.phpt | 2 +- Zend/zend_compile.c | 2 +- 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"); } } -- 2.40.0