Skip to content

Commit

Permalink
Add WP_DEBUG to prevent uncatchable error from php's @
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Nov 13, 2020
1 parent 2f48444 commit 6cd400d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ private static function include_wp( $dir ) {
$wp_load = $dir . DIRECTORY_SEPARATOR . 'wp-load.php';

if ( is_readable( $wp_load ) ) {
// Turn debug ON to prevent usage of `@`!
define( 'WP_DEBUG', true );

try {
require_once $wp_load;
} catch ( ErrorException $ee ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch -- empty OK.
Expand Down

0 comments on commit 6cd400d

Please sign in to comment.