From: Cash Costello Date: Sun, 2 Aug 2009 22:10:48 +0000 (+0000) Subject: should fix warnings that occur occasionally on array_search X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=cb92fa6bf0ec144504e59cfcaa49d97d386ece4d;p=lorea%2Felgg.git should fix warnings that occur occasionally on array_search --- diff --git a/views/default/object/image.php b/views/default/object/image.php index e5ccd2276..dc77c41ca 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -164,7 +164,8 @@ if ($photo_tags) { array_push($_SESSION['image_sort'], $image->guid); } - $current = array_search($file_guid, $_SESSION['image_sort']); + if ($_SESSION['image_sort']) + $current = array_search($file_guid, $_SESSION['image_sort']); } if ($current != 0)