typerocket/whoops

This package is abandoned and no longer maintained. No replacement package was suggested.

Whoops for WordPress

v1.0.3 2020-01-02 02:02 UTC

This package is auto-updated.

Last update: 2020-10-01 00:09:35 UTC


README

To temporarily disable whoops output you can use ?wps_disable query argument in the URL.

// Add Whoops
if(WP_DEBUG == true) {
  $run = new \Whoops\Run;
  $run->prependHandler(new WordPressHtmlHandler);
  $run->register();
}
else {
    set_error_handler(function ($num, $str, $file, $line) {
        throw new \ErrorException($str, 0, $num, $file, $line);
    }, E_ALL);
}