From 223a626abc5757fbce0b6ce4e0a4a4a1cf4980e4 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sun, 22 Jul 2007 16:58:59 +0000 Subject: issue65, fixed incorrect array_rand handling git-svn-id: file:///var/lib/svn/phpfspot/trunk@246 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpfspot.class.php') diff --git a/phpfspot.class.php b/phpfspot.class.php index d2bb895..a7290b6 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -1743,10 +1743,10 @@ class PHPFSPOT { "); while($row = $this->db->db_fetch_object($result)) { - array_push($all, $row[0]); + array_push($all, $row['id']); } - return array_rand($all); + return $all[array_rand($all)]; } // get_random_photo() -- cgit v1.2.3-18-g5258