Bug #70931 [Fbk]: Two errors messages are in conflict
Edit report at https://bugs.php.net/bug.php?id=70931&edit=1
ID: 70931
Updated by: dams@php.net
Reported by: dams@php.net
Summary: Two errors messages are in conflict
Status: Feedback
Type: Bug
Package: Unknown/Other Function
Operating System: Any
PHP Version: 7.0.0RC7
Block user comment: N
Private report: N
New Comment:
New suggestion :
" or after any declare call"
Previous Comments:
------------------------------------------------------------------------
[2015-11-19 03:21:48] laruence@php.net
I am not sure what message will be best, but " or the second after a declare call" seems
not very good. like:
declare()...
declare()...
namespace?
------------------------------------------------------------------------
[2015-11-17 20:52:50] dams@php.net
Description:
------------
It is possible to have the following errors :
"Encoding declaration pragma must be the very first statement in the script"
And Then :
"Namespace declaration statement has to be the very first statement in the script"
Is is also possible to have the following, in place of the first statement :
"strict_types declaration must be the very first statement in the script"
In fact, namespace declaration should happen in first in the script, but AFTER
encoding or strict_types declare calls.
Expected result:
----------------
All C code is in Zend/zend_compile.c file.
Line 4498 for "Encoding declaration pragma "
Line 4505 for "strict_types declaration pragma "
line 5827 for "Namespace declaration statement "
I suggest the second error message is updated and mention the 'declare' (see patch)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70931&edit=1
Thread (7 messages)