Skip groups that are null. This is done because groups with only one entry are concatenated with their entry.

redesign-copyrights
Thomas Marstrander 2015-05-21 13:02:52 +02:00
parent 3f6abd722d
commit 99522f59bf
1 changed files with 4 additions and 0 deletions

View File

@ -2811,6 +2811,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.