From 834764e31645de1a8672f5cc36eaed7161ef523e Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 20 May 2015 10:55:02 +0200 Subject: [PATCH] Eliminate warnings. --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 2f6d31d..72be902 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2593,7 +2593,7 @@ class H5PContentValidator { } // Check if string is according to optional regexp in semantics - if (!($text === '' && $semantics->optional) && isset($semantics->regexp)) { + if (!($text === '' && isset($semantics->optional) && $semantics->optional) && isset($semantics->regexp)) { // Escaping '/' found in patterns, so that it does not break regexp fencing. $pattern = '/' . str_replace('/', '\\/', $semantics->regexp->pattern) . '/'; $pattern .= isset($semantics->regexp->modifiers) ? $semantics->regexp->modifiers : '';