From 91120e6ad96ed11c65375ad027459db36b7fb979 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 30 Jun 2007 07:52:11 +0000 Subject: [PATCH 1/1] avoid error messages if $_SESSION['selected_tags'] is set with an empty value in photo index view git-svn-id: file:///var/lib/svn/phpfspot/trunk@138 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpfspot.class.php b/phpfspot.class.php index e052f3c..13517f2 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -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); -- 2.25.1