diff --git a/gallery.module b/gallery.module index 2dfe9513987a49d3eed24c88db39fe1485db83c8..d9639c335371cd3dafec1e49f548fbc709a22933 100644 --- a/gallery.module +++ b/gallery.module @@ -136,12 +136,14 @@ function gallery_block($op = 'list', $delta = 0) { case 1: $blocks = variable_get('gallery_blocks', array()); $show = variable_get('gallery_show', array()); - if (count($blocks) && count($show)) { + if (is_array($blocks) && count($blocks) > 0) { _gallery_init(); $params = array('blocks' => implode('|', $blocks), - 'show' => implode('|', $show), 'header' => 1, 'maxsize' => 140); + if (is_array($show)) { + $params['show'] = implode('|', $show); + } list($ret, $content) = GalleryEmbed::getImageBlock($params); if ($content) {