From a26064220be7dc052fbc9155fc9a5363869a182d Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Sat, 9 Jan 2016 19:02:20 +0200 Subject: [PATCH] Don't bother checking if WP_DEBUG is defined. It's always defined. Checked as far back as WP 3.2. WordPress defines it in `/wp-includes/default-constants.php`. --- plugin-update-checker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-update-checker.php b/plugin-update-checker.php index 35acf55..dc0afeb 100644 --- a/plugin-update-checker.php +++ b/plugin-update-checker.php @@ -58,7 +58,7 @@ class PluginUpdateChecker_2_3 { $this->checkPeriod = $checkPeriod; $this->slug = $slug; $this->optionName = $optionName; - $this->debugMode = defined('WP_DEBUG') && WP_DEBUG; + $this->debugMode = (bool)(constant('WP_DEBUG')); //If no slug is specified, use the name of the main plugin file as the slug. //For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'.