From 99522f59bfafbe50c99b1eebde841d38b14b9357 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Thu, 21 May 2015 13:02:52 +0200 Subject: [PATCH] Skip groups that are null. This is done because groups with only one entry are concatenated with their entry. --- h5p.classes.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index 0bd122a..ca0fb8e 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2811,6 +2811,10 @@ class H5PContentValidator { } } if (!(isset($semantics->optional) && $semantics->optional)) { + if ($group === NULL) { + // Error no value. Errors aren't printed... + return; + } foreach ($semantics->fields as $field) { if (!(isset($field->optional) && $field->optional)) { // Check if field is in group.