Created
August 15, 2022 19:05
-
-
Save sc0ttkclark/7bd3a53599fccb68866dd8b6eb12610c to your computer and use it in GitHub Desktop.
A quick handy debugging file for wp-content/php-error.php to expose critical errors more thoroughly. DO NOT LEAVE THIS ON PROD SITES.
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
<?php | |
/** | |
* A quick handy debugging file for wp-content/php-error.php to expose critical errors more thoroughly. | |
* | |
* DO NOT LEAVE THIS ON PROD SITES. | |
*/ | |
echo '<h1>Site PHP Error</h1>'; | |
echo '<pre>'; | |
var_dump( [ | |
'error type' => $error['type'], | |
'error message' => $error['message'], | |
'error file' => $error['file'], | |
'error line' => $error['line'], | |
'$handled' => $handled, | |
] ); | |
echo '</pre>'; | |
echo '<h2>Debug backtrace</h2>'; | |
echo '<pre>'; | |
var_dump( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ) ); | |
echo '</pre>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment