Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Stop PHP’s dangerous name handling
// Stop PHP’s dangerous name handling
function undefined_name_error($errno, $errstr, $errfile='', $errline=0, $errcontext=NULL) {
if (stripos($errstr, 'Undefined') !== false) {
error_log("PHP Fatal error: $errstr in $errfile on line $errline");
else {
return false;
set_error_handler('undefined_name_error', E_NOTICE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.