summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-01-26 09:08:03 +0100
committershadlaws <shad@shadlaws.com>2013-01-26 09:08:03 +0100
commit603db40459fdaebb5917c8c5aef922476700dce2 (patch)
treee19bfd31357ee6a1f2f98e08bfd96c7cd65b662e /modules/gallery
parent847a825b2527584662da277fd6a47921287cbbf4 (diff)
#1966 - "Fix your Gallery" shows 60/59 items completed.
- Fixed counter in gallery_task::fix that was often one too many. For FIX_STATE_RUN_MISSING_ACCESS_CACHES, changed this: $stack = explode(" ", $task->get("stack")); To this: $stack = array_filter(explode(" ", $task->get("stack")));
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/gallery_task.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php
index 82ca9ffc..8eb981a2 100644
--- a/modules/gallery/helpers/gallery_task.php
+++ b/modules/gallery/helpers/gallery_task.php
@@ -612,7 +612,7 @@ class gallery_task_Core {
break;
case self::FIX_STATE_RUN_MISSING_ACCESS_CACHES:
- $stack = explode(" ", $task->get("stack"));
+ $stack = array_filter(explode(" ", $task->get("stack"))); // filter removes empty/zero ids
if (!empty($stack)) {
$id = array_pop($stack);
$access_cache = ORM::factory("access_cache");