From f2477703faa7cd05ff1aa16da3ecef7b666bef40 Mon Sep 17 00:00:00 2001 From: Joe7 Date: Fri, 7 Jan 2011 17:33:37 +0100 Subject: Fix against ticket #1581 - based on https://github.com/Joe7/gallery3/commit/0d36b97aca3b5ed53ea3ea398ce28b0f6198e577 --- modules/g2_import/helpers/g2_import.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/g2_import') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 8de5ce44..b2e3836a 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -499,6 +499,9 @@ class g2_import_Core { static function set_album_highlight(&$queue) { // Dequeue the current album and enqueue its children list($g2_album_id, $children) = each($queue); + if (empty($children)) { + return; + } unset($queue[$g2_album_id]); foreach ($children as $key => $value) { $queue[$key] = $value; -- cgit v1.2.3