Skip to content

Instantly share code, notes, and snippets.

@wizonesolutions
Created December 9, 2013 22:44
Show Gist options
  • Save wizonesolutions/7882410 to your computer and use it in GitHub Desktop.
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.
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