note 115700 added to function.require
| From: | theunis dot botha1 at gmail dot com | Date: | Thu, 11 Sep 2014 11:33:22 +0000 |
| Subject: | note 115700 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200407@lists.php.net to get a copy of this message | ||
Just for those who may wonder about receiving E_WARNING (in custom error handlers) - PHP generates
an E_WARNING when require or require_once fails - and before control returns to your script, it
generates an E_COMPILE_ERROR.
So when require() or require_once() fails - don't be surprised to see two messages in your logs
(if you have your logging setup this way) - once for the E_WARNING caught by your custom error
handler, and once for getting the error from error_get_last() in your shutdown function (which is
the actual E_COMPILE_ERROR you were expecting)
----
Server IP: 72.52.91.14
Probable Submitter: 213.61.213.230
----
Manual Page -- http://php.net/manual/en/function.require.php
Edit -- https://master.php.net/note/edit/115700
Del: integrated -- https://master.php.net/note/delete/115700/integrated
Del: useless -- https://master.php.net/note/delete/115700/useless
Del: bad code -- https://master.php.net/note/delete/115700/bad+code
Del: spam -- https://master.php.net/note/delete/115700/spam
Del: non-english -- https://master.php.net/note/delete/115700/non-english
Del: in docs -- https://master.php.net/note/delete/115700/in+docs
Del: other reasons-- https://master.php.net/note/delete/115700
Reject -- https://master.php.net/note/reject/115700
Search -- https://master.php.net/manage/user-notes.php