Avoid errors. Merged in from D7.

redesign-copyrights
Frode Petterson 2015-05-27 10:11:01 +02:00
parent 52dca53883
commit aded8d1f43
1 changed files with 4 additions and 0 deletions

View File

@ -2893,6 +2893,10 @@ class H5PContentValidator {
} }
} }
if (!(isset($semantics->optional) && $semantics->optional)) { if (!(isset($semantics->optional) && $semantics->optional)) {
if ($group === NULL) {
// Error no value. Errors aren't printed...
return;
}
foreach ($semantics->fields as $field) { foreach ($semantics->fields as $field) {
if (!(isset($field->optional) && $field->optional)) { if (!(isset($field->optional) && $field->optional)) {
// Check if field is in group. // Check if field is in group.