Skip to content

Instantly share code, notes, and snippets.

@sc0ttkclark
Created December 1, 2021 23:57
Show Gist options
  • Save sc0ttkclark/5c00129f33117484f727a045e0e5b395 to your computer and use it in GitHub Desktop.
Save sc0ttkclark/5c00129f33117484f727a045e0e5b395 to your computer and use it in GitHub Desktop.
PHP Error debugging file in WP, to be placed in /wp-content/php-error.php
<?php
echo '<h1>Site PHP Error</h1>';
echo '<h2>Type</h2>';
var_dump( $error['type'] );
echo '<h2>Message</h2>';
echo '<pre>';
echo $error['message'];
echo '</pre>';
echo '<h2>Other Info</h2>';
var_dump( $error['file'] );
var_dump( $error['line'] );
var_dump( $handled );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment