Commit 831642ca authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Silence a "undefined index" error

Bug 1402912

Change-Id: I519a7ef9bb116baf6fe1186d2e5de681a1543e77
parent 0b07add5
......@@ -29,8 +29,12 @@ class PluginBlocktypeText extends SystemBlocktype {
safe_require('artefact', 'file');
$configdata = $instance->get('configdata');
// Add all artefacts found in the text
$text = $configdata['text'];
$artefacts = array_unique(artefact_get_references_in_html($text));
if (empty($configdata['text'])) {
$artefacts = array();
}
else {
$artefacts = array_unique(artefact_get_references_in_html($configdata['text']));
}
return $artefacts;
}
......
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