Eliminate warnings.

redesign-copyrights
Frode Petterson 2015-05-20 10:55:02 +02:00
parent ac96408bc9
commit 834764e316
1 changed files with 1 additions and 1 deletions

View File

@ -2593,7 +2593,7 @@ class H5PContentValidator {
} }
// Check if string is according to optional regexp in semantics // 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. // Escaping '/' found in patterns, so that it does not break regexp fencing.
$pattern = '/' . str_replace('/', '\\/', $semantics->regexp->pattern) . '/'; $pattern = '/' . str_replace('/', '\\/', $semantics->regexp->pattern) . '/';
$pattern .= isset($semantics->regexp->modifiers) ? $semantics->regexp->modifiers : ''; $pattern .= isset($semantics->regexp->modifiers) ? $semantics->regexp->modifiers : '';