Created
December 10, 2013 20:26
-
-
Save cyberhobo/7897674 to your computer and use it in GitHub Desktop.
PHP (5.3 and up) Notice & Warning Backtrace - just need to quickly see what's causing that message in a non-production environment? Override error handling. In WordPress I do this in my wp-config.php, and remove it again when done.
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
set_error_handler( function( $no, $str, $file, $line ) { | |
echo "<pre>$str\n"; | |
var_dump( debug_backtrace() ); | |
echo "</pre>"; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment