JI-942 Add extra check for library upload

pull/48/head^2
Frode Petterson 2019-02-05 17:14:34 +01:00
parent d1dd47be6f
commit 415e101064
1 changed files with 1 additions and 1 deletions

View File

@ -930,7 +930,7 @@ class H5PValidator {
if (!empty($missingLibraries)) {
// We still have missing libraries, check if our main library has an upgrade (BUT only if we has content)
$mainDependency = NULL;
if (!$skipContent) {
if (!$skipContent && !empty($mainH5PData)) {
foreach ($mainH5PData['preloadedDependencies'] as $dep) {
if ($dep['machineName'] === $mainH5PData['mainLibrary']) {
$mainDependency = $dep;