Only set tutorial url if it exists.

HFP-348
improved-embed-and-download^2
thomasmars 2016-12-13 11:36:28 +01:00
parent 52dc1b2a81
commit a326066c97
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}
}