Commit bb149ecd authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1833301: Handle export of text block with missing 'text' attribute"

parents 3b6732ee d1e69948
......@@ -155,7 +155,8 @@ class PluginBlocktypeText extends MaharaCoreBlocktype {
*/
public static function export_blockinstance_config_leap(BlockInstance $bi) {
$configdata = $bi->get('configdata');
$result = array('text' => json_encode(array($configdata['text'])));
$text = !empty($configdata['text']) ? json_encode(array($configdata['text'])) : '';
$result = array('text' => $text);
return $result;
}
......
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