Standalone out of bounds error

SamBeckett
SamBeckett's picture

Joined: 2002-09-29
Posts: 146
Posted: Wed, 2003-10-15 03:15

with v1.4-pl1
and using http://gallery.menalto.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=23
after following the instructions i get the error:

Warning: rand() expects parameter 2 to be long, string given in /home/httpd/vhosts/mysite.com/httpdocs/gallery/block-random.php on line 138
ERROR: requested index [] out of bounds [2842]
Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/mysite.com/httpdocs/gallery/classes/Album.php on line 705

(this is constant, although the random image did display once)

 
SamBeckett
SamBeckett's picture

Joined: 2002-09-29
Posts: 146
Posted: Wed, 2003-10-15 03:25

duh, i found the ansewer:

beckett wrote:
You've found one of the bugs I mentioned. :)
In block-random.php find this line:
$choose = rand(1, $count);
and replace it with
$choose = rand(1, (int) $count);

As for the out of bounds error, remember that the cache file only updates once every 24 hours. If you remove it, it will update again right away.

-Beckett (

)