From adab29eefdbb5c538d12dbf50370cb3343226b0b Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 22 Jun 2009 22:23:34 -0400 Subject: [PATCH] wrap a function in a check --- classes/PluginWonderful.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/classes/PluginWonderful.php b/classes/PluginWonderful.php index 82953e0..569c904 100644 --- a/classes/PluginWonderful.php +++ b/classes/PluginWonderful.php @@ -103,16 +103,18 @@ class PluginWonderful { } function render_widget_control($adboxid) { - foreach ($this->publisher_info->adboxes as $box) { - if ($box->adboxid == $adboxid) { - echo ''; - echo ''; - break; - } - } + if ($this->publisher_info !== false) { + foreach ($this->publisher_info->adboxes as $box) { + if ($box->adboxid == $adboxid) { + echo ''; + echo ''; + break; + } + } + } } function handle_activation() {