diff --git a/Free Learning/CHANGEDB.php b/Free Learning/CHANGEDB.php index 6afefea..fcb7254 100644 --- a/Free Learning/CHANGEDB.php +++ b/Free Learning/CHANGEDB.php @@ -2116,3 +2116,8 @@ ++$count; $sql[$count][0] = '5.20.08'; $sql[$count][1] = ""; + +//v5.20.09 +++$count; +$sql[$count][0] = '5.20.09'; +$sql[$count][1] = ""; diff --git a/Free Learning/CHANGELOG.txt b/Free Learning/CHANGELOG.txt index 1cc8b4c..8239a4e 100644 --- a/Free Learning/CHANGELOG.txt +++ b/Free Learning/CHANGELOG.txt @@ -1,5 +1,9 @@ CHANGELOG ========= +v5.20.09 +-------- +Fixed error exporting units that contain empty blocks + v5.20.08 -------- Fix collaborator list for units with multiple prerequisites diff --git a/Free Learning/manifest.php b/Free Learning/manifest.php index 7ca712e..0aa164f 100644 --- a/Free Learning/manifest.php +++ b/Free Learning/manifest.php @@ -25,7 +25,7 @@ $entryURL = 'units_browse.php'; $type = 'Additional'; $category = 'Learn'; -$version = '5.20.08'; +$version = '5.20.09'; $author = 'Ross Parker'; $url = 'http://rossparker.org/free-learning'; diff --git a/Free Learning/src/UnitExporter.php b/Free Learning/src/UnitExporter.php index d4cd38d..b0b77e3 100644 --- a/Free Learning/src/UnitExporter.php +++ b/Free Learning/src/UnitExporter.php @@ -95,6 +95,8 @@ public function addUnitToExport($freeLearningUnitID) $blocks = $this->unitBlockGateway->selectBlocksByUnit($freeLearningUnitID)->fetchAll(); foreach ($blocks as $index => $block) { $dom = new DOMDocument(); + if (empty($blocks[$index]['contents'])) continue; + @$dom->loadHTML($blocks[$index]['contents']); foreach ($dom->getElementsByTagName('img') as $node) { $src = $node->getAttribute('src'); diff --git a/Free Learning/version.php b/Free Learning/version.php index fec6ee8..f70a3c3 100755 --- a/Free Learning/version.php +++ b/Free Learning/version.php @@ -20,5 +20,5 @@ /** * Sets version information. */ -$moduleVersion = '5.20.08'; +$moduleVersion = '5.20.09'; $coreVersion = '23.0.00';