Fix warning in toDBArray()
Prevent accessing keys of metadata that don't existsemi-fullscreen
parent
2e305ded71
commit
066ea94b11
|
@ -85,7 +85,7 @@ abstract class H5PMetadata {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($metadata[$key] === null || isset($metadata[$key])) {
|
if (array_key_exists($key, $metadata) && ($metadata[$key] === null || isset($metadata[$key]))) {
|
||||||
$value = $metadata[$key];
|
$value = $metadata[$key];
|
||||||
$db_field_name = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $key));
|
$db_field_name = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $key));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue