From aded8d1f438d5244739e0bdcdb64f5e603ad4727 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 27 May 2015 10:11:01 +0200 Subject: [PATCH] Avoid errors. Merged in from D7. --- h5p.classes.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index d83dd5e..e22e291 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2893,6 +2893,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.