From a326066c97dd4d226f2bc72cdfc5410438704918 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Tue, 13 Dec 2016 11:36:28 +0100 Subject: [PATCH] Only set tutorial url if it exists. HFP-348 --- h5p.classes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 0d92330..b003a27 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2423,7 +2423,9 @@ class H5PCore { // Handle libraries metadata if (isset($json->libraries)) { foreach ($json->libraries as $machineName => $libInfo) { - $this->h5pF->setLibraryTutorialUrl($machineName, $libInfo->tutorialUrl); + if (isset($libInfo->tutorialUrl)) { + $this->h5pF->setLibraryTutorialUrl($machineName, $libInfo->tutorialUrl); + } } }