Bug #80741 [Opn]: garbage text "($implicit=uninitialized)" randomly appears within error message
| From: | php4fan at gmail dot com | Date: | Fri, 12 Feb 2021 20:50:49 +0000 |
| Subject: | Bug #80741 [Opn]: garbage text "($implicit=uninitialized)" randomly appears within error message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232113@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80741&edit=1
ID: 80741
User updated by: php4fan at gmail dot com
Reported by: php4fan at gmail dot com
Summary: garbage text "($implicit=uninitialized)" randomly
appears within error message
Status: Open
Type: Bug
Package: *General Issues
Operating System: linux
PHP Version: 7.4.15
Block user comment: N
Private report: N
New Comment:
It turns out that the first error message actually makes sense.
The third item in the backtrace:
3. vbseo_get_forum_info($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041
means that the function vbseo_get_forum_info(), whose signature is
vbseo_get_forum_info($implicit=false) was called without any argument.
The reason I immediately dismissed that as nonsensical without looking at the signature of the
function, is that I first saw the other error message:
[Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071:
Got error '($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'
and this one definitely does *not* make sense.
Now, I see what happened: the latter nonsensical error message is actually the result of a single
error message being split and logged as if it was two consecutive error messages:
[Fri Feb 12 19:26:25.663275 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got
error 'PHP message: PHP Warning: Use of undefined constant THIS_SCRIPT - assumed
'THIS_SCRIPT' (this will throw an Error in a future version of PHP) in
/XXXXX/htdocs/vbseo/includes/functions_vbseo_vb.php on line 1128PHP message: PHP Stack trace:PHP
message: PHP 1. {main}() /XXXXX/htdocs/vbpvbseo.php:0PHP message: PHP 2. include()
/XXXXX/htdocs/vbpvbseo.php:151PHP message: PHP 3. vbseo_get_forum_info'
[Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got
error '($implicit = *uninitialized*) /XXXXX/htdocs/vbseo.php:1041'
You can see that it's actually one error message that is split in two parts.
There are many instances of this (legitimate) error in my log, most of them are correct, but a few
here and there are split into two like that. So that is the real issue: error messages being
randomly split into multiple (namely two) log entries per error.
Previous Comments:
------------------------------------------------------------------------
[2021-02-12 19:32:50] nikic@php.net
PHP does not generate this kind of error message, something else must be doing it (xdebug, custom
error handler, etc).
------------------------------------------------------------------------
[2021-02-12 18:58:38] danack@php.net
What extensions do you have enabled?
Also, if you are using Suhosin, try disabling it.
------------------------------------------------------------------------
[2021-02-12 18:52:42] php4fan at gmail dot com
Description:
------------
Errors logged to the error log file sometimes contain this garbage string:
$implicit = *uninitialized*
inserted into the error messages at apparently random places.
For example, here a logged error:
[Fri Feb 12 19:26:25.663189 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071:
Got error 'PHP message: PHP Warning: Use of undefined constant THIS_SCRIPT - assumed
'THIS_SCRIPT' (this will throw an Error in a future version of PHP) in
/XXXXX/web/htdocs/vbseo/includes/functions_vbseo_vb.php on line 1128PHP message: PHP Stack trace:PHP
message: PHP 1. {main}() /XXXXX/web/htdocs/vbpvbseo.php:0PHP message: PHP 2. include()
/XXXXX/web/htdocs/vbpvbseo.php:151PHP message: PHP 3. vbseo_get_forum_info($implicit =
*uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'
This is a legitimate error, and the backtrace looks correct, except for the nonsensical
"$implicit = *uninitialized*" which certainly means something to the person who wrote it
but not to anybody else.
In this case above I can still make sense of the error message and of the backtrace. However this
other one:
[Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got
error '($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'
The error is just that nonsensical thing followed by the file and line where the error supposedly
happen, but it doesn't tell me what the error actually is (unless I know how to decypher
"$implicit = *uninitialized*").
Line 1041 of that file is just a function call with no arguments:
vbseo_get_forum_info();
so it makes no sense whatsoever that you get an error message right there, unless:
- the function does not exist: in which case you should get a sensible error message like "Call
to undefined function"; or
- the error happens inside the function, in which case the error message would not point to that
line where the function is called, but the line inside the function where the error happens.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80741&edit=1