summaryrefslogtreecommitdiff
path: root/modules/image_block
diff options
context:
space:
mode:
Diffstat (limited to 'modules/image_block')
-rw-r--r--modules/image_block/helpers/image_block_block.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php
index 51ccc4a0..da6e8782 100644
--- a/modules/image_block/helpers/image_block_block.php
+++ b/modules/image_block/helpers/image_block_block.php
@@ -31,7 +31,7 @@ class image_block_block_Core {
// @todo Consider another fallback if further optimizations are necessary.
$attempts = 0;
do {
- $item = item::random_query(array(array("type", "!=", "album")))->find_all(1)->current();
+ $item = item::random_query()->where("type", "!=", "album")->find_all(1)->current();
} while (!$item && $attempts++ < 3);
if ($item && $item->loaded()) {
$block = new Block();