Commit aad4f540 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix warning when a gallery block without images is configured


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 3b72d6bf
......@@ -168,8 +168,10 @@ class PluginBlocktypeGallery extends PluginBlocktype {
AND a.owner = ?;",
array($user));
$values['artefactids'] = array();
foreach ($userimages as $image) {
$values['artefactids'][] = $image->artefact;
if ($userimages) {
foreach ($userimages as $image) {
$values['artefactids'][] = $image->artefact;
}
}
}
return $values;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment