note 127210 deleted from migration80.incompatible by crell

From: Date: Sun, 03 Jul 2022 17:42:06 +0000
Subject: note 127210 deleted from migration80.incompatible by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218891@lists.php.net to get a copy of this message
Note Submitter: php at richardneill dot org ---- 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);

« previous php.notes (#218891) next »