From a29ec4735a0ca5630838251b83d3860acf163709 Mon Sep 17 00:00:00 2001
From: SecretR <secretr@e107.org>
Date: Thu, 24 Oct 2013 01:43:47 +0300
Subject: [PATCH] Possible extract issue

---
 e107_core/shortcodes/batch/bbcode_shortcodes.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php
index bd204c64c..3c5ad1377 100644
--- a/e107_core/shortcodes/batch/bbcode_shortcodes.php
+++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php
@@ -488,6 +488,8 @@ class bbcode_shortcodes extends e_shortcode
 			foreach($eplug_bb as $val)  // allow plugins to plug into it.
 			{
 				if(!$val) continue;
+				unset($onclick,$onclick_var,$helptext,$icon,$function,$function_var);
+				
 				extract($val); 
 				//	echo "$onclick $onclick_var $helptext $icon <br />";
 				$bbcode[$name] = array($onclick,$onclick_var,$helptext,$icon,$function,$function_var);
@@ -495,6 +497,8 @@ class bbcode_shortcodes extends e_shortcode
 				else unset($iconpath[$name]);
 			}
 		}
+		
+		if(!$iconpath[$parm]) return '';
 
 		$pre = "\n";
 		$post = "\n";
@@ -511,8 +515,6 @@ class bbcode_shortcodes extends e_shortcode
 			$post = "</a>\n";	
 		}
 		
-		if(!$iconpath[$parm]) return '';
-
 		if($bbcode[$parm])  // default - insert text.
 		{
 			$text = $pre;