avoid error messages if $_SESSION['selected_tags'] is set with an empty value in...
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 30 Jun 2007 07:52:11 +0000 (07:52 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 30 Jun 2007 07:52:11 +0000 (07:52 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@138 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index e052f3c08e206e75e9e66ba3ca0a9149daccabac..13517f2550e14444e209e05a7b795c291cf1731b 100644 (file)
@@ -436,9 +436,12 @@ class PHPFSPOT {
       }
 
       $current_tags = "";
-      foreach($_SESSION['selected_tags'] as $tag)
-         $current_tags.= $tag .",";
-      $current_tags = substr($current_tags, 0, strlen($current_tags)-1);
+      if($_SESSION['selected_tags'] != "") {
+         foreach($_SESSION['selected_tags'] as $tag)
+            $current_tags.= $tag .",";
+         $current_tags = substr($current_tags, 0, strlen($current_tags)-1);
+      }
+
       $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi&tags=". $current_tags;
 
       $this->tmpl->assign('extern_link', $extern_link);