note 127210 added to migration80.incompatible
| From: | php at richardneill dot org | Date: | Sat, 02 Jul 2022 01:43:31 +0000 |
| Subject: | note 127210 added to migration80.incompatible | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218885@lists.php.net to get a copy of this message | ||
If you want to "demote" the "Undefined array key" error back from a WARNING to a
NOTICE, you can do it this way:
//Convert the error from E_WARNING to E_USER_NOTICE.
set_error_handler(function($errno, $error){
if (!str_starts_with($error, 'Undefined array key')){
return false; //default error handling rules.
}else{
trigger_error($error, E_USER_NOTICE);
return true;
}
}, E_WARNING);
//You may also then want to ignore E_USER_NOTICE.
ini_set ("error_reporting", E_ALL & ~E_NOTICE & ~E_USER_NOTICE);
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.133 (proxied: 185.254.136.122)
----
Manual Page -- https://php.net/manual/en/migration80.incompatible.php
Edit -- https://main.php.net/note/edit/127210
Del: integrated -- https://main.php.net/note/delete/127210/integrated
Del: useless -- https://main.php.net/note/delete/127210/useless
Del: bad code -- https://main.php.net/note/delete/127210/bad+code
Del: spam -- https://main.php.net/note/delete/127210/spam
Del: non-english -- https://main.php.net/note/delete/127210/non-english
Del: in docs -- https://main.php.net/note/delete/127210/in+docs
Del: other reasons-- https://main.php.net/note/delete/127210
Reject -- https://main.php.net/note/reject/127210
Search -- https://main.php.net/manage/user-notes.php