Skip to content

Commit

Permalink
Merge branch 'MDL-74895-400' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_400_STABLE
  • Loading branch information
junpataleta committed Aug 4, 2022
2 parents 287d2a5 + eb5cce9 commit 61421c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion h5p/classes/core.php
Expand Up @@ -277,7 +277,13 @@ public function fetch_content_type(array $library): ?int {
$file->delete();

$librarykey = static::libraryToString($library);
$libraryid = $factory->get_storage()->h5pC->librariesJsonData[$librarykey]["libraryId"];

$libraryjson = $factory->get_storage()->h5pC->librariesJsonData[$librarykey];
if (!array_key_exists('libraryId', $libraryjson)) {
return null;
}

$libraryid = $libraryjson['libraryId'];

// Update example and tutorial (if any of them are defined in $library).
$params = ['id' => $libraryid];
Expand Down

0 comments on commit 61421c7

Please sign in to comment.