Undefined variable if debugging is enabled, fixable with 1 line of code
-
If you are using this plugin it still works but if you decide to turn on WordPress’s debugging like below:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
You’ll be met with an error:
Notice: Undefined variable: wpmu_version in /home/HOSTHERE/public_html/wp-content/plugins/kb-advanced-rss-widget/versions/wp-2-8.php on line 53
Which relates to this bit of code:
if ($wpmu_version) define('KBRSS_WPMU', true); else define('KBRSS_WPMU', false); // change here to override and make always true
It should be preceded by
global $wpmu_version;
Also surely should be coded like below, with the brackets…:
global $wpmu_version; if ($wpmu_version) { define('KBRSS_WPMU', true); } else { define('KBRSS_WPMU', false); // change here to override and make always true }
https://www.ads-software.com/plugins/kb-advanced-rss-widget/
- The topic ‘Undefined variable if debugging is enabled, fixable with 1 line of code’ is closed to new replies.