Commit dbccc20a authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1591759: Fixing importation of empty text box



Stopping it giving an 'undefined index' warning

behatnotneeded

Change-Id: Ie0e5acc7b9364dd9ba9c2d419c365e40230a8717
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 409609dc
......@@ -125,9 +125,13 @@ class PluginBlocktypeText extends MaharaCoreBlocktype {
*/
public static function import_rewrite_blockinstance_extra_config_leap(array $artefactids, array $configdata) {
// Rewrite embedded image urls in the configdata['text']
require_once('embeddedimage.php');
$configdata['text'] = EmbeddedImage::rewrite_embedded_image_urls_from_import($configdata['text'], $artefactids);
if (!empty($configdata['text'])) {
require_once('embeddedimage.php');
$configdata['text'] = EmbeddedImage::rewrite_embedded_image_urls_from_import($configdata['text'], $artefactids);
}
else {
$configdata['text'] = '';
}
return $configdata;
}
......
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