Created
December 9, 2013 22:44
-
-
Save wizonesolutions/7882410 to your computer and use it in GitHub Desktop.
Pure evil. Seen in code while doing some maintenance work. The poor code style adds extra enjoyment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mytheme_error_handler($errno, $message, $filename, $line, $context) { | |
$aBypass = array( | |
'Attempt to modify property of non-object', | |
'expected to be a reference, value given', | |
); | |
foreach ($aBypass as $sTerm) { | |
if (false !== strpos($message, $sTerm)) { | |
return; | |
} | |
} | |
return drupal_error_handler($errno, $message, $filename, $line, $context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment