Eliminate warnings.
parent
ac96408bc9
commit
834764e316
|
@ -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 : '';
|
||||||
|
|
Loading…
Reference in New Issue