|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-02-12 18:52 UTC] 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
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.