Commit f65e1d92 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make the profileinfo block's get_artefacts method less likely to return blank artefact IDs.


Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 2659ef71
......@@ -101,15 +101,15 @@ class PluginBlocktypeProfileinfo extends PluginBlocktype {
*/
public static function get_artefacts(BlockInstance $instance) {
$configdata = $instance->get('configdata');
$return = false;
if (isset($configdata['artefactids'])) {
$return = array();
if (isset($configdata['artefactids']) && is_array($configdata['artefactids'])) {
$return = $configdata['artefactids'];
}
if (!empty($configdata['profileicon'])) {
$return = array_merge((array)$return, array($configdata['profileicon']));
$return = array_merge($return, array($configdata['profileicon']));
}
return $return;
return $return ? $return : false;
}
public static function has_instance_config() {
......
Supports Markdown
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