]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
should fix warnings that occur occasionally on array_search
authorCash Costello <cash.costello@gmail.com>
Sun, 2 Aug 2009 22:10:48 +0000 (22:10 +0000)
committerCash Costello <cash.costello@gmail.com>
Sun, 2 Aug 2009 22:10:48 +0000 (22:10 +0000)
views/default/object/image.php

index e5ccd22762e90184a8742642acbc8063cdffd4f1..dc77c41cae110461c2722cf633c5fe3515fda3d7 100644 (file)
@@ -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)