Skip to content

Commit

Permalink
Displays XML error messages on production website
Browse files Browse the repository at this point in the history
In the current configuration FoundationPress is displaying error messages on production websites that have WP_DEBUG set to false. This corrects the issue, and only outputs to the page if WP_DEBUG_DISPLAY is set to true.
  • Loading branch information
cyberscribe committed Jul 16, 2015
1 parent d3e5ac1 commit 26984f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ public function recreate_img_tag( $tag ) {
}

catch ( Exception $e ) {
if (defined('WP_DEBUG') && WP_DEBUG) {
echo 'Caught exception: ', $e->getMessage(), "\n";
if ( defined('WP_DEBUG') && WP_DEBUG ) {
if ( defined('WP_DEBUG_DISPLAY') && WP_DEBUG_DISPLAY ) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
}

Expand Down

0 comments on commit 26984f3

Please sign in to comment.