diff -r b38afb86dcad -r f6ca7cead82c plugins/gallery/sidebar.php --- a/plugins/gallery/sidebar.php Thu Aug 09 12:34:39 2007 -0400 +++ b/plugins/gallery/sidebar.php Wed Nov 21 15:22:13 2007 -0500 @@ -38,7 +38,7 @@ $rand = array_rand($images); $image = $images[$rand]; $acl = $session->fetch_page_acl(strval($rand), 'Gallery'); - if ( $acl->get_permissions('read') ) + if ( is_object($acl) && $acl->get_permissions('read') ) { $my_image = $image; break;