#497 Portal : Could not update object due to "Warning: preg_match(): Unknown modifier '/'"

SVN:trunk[4460]
This commit is contained in:
Guillaume Lajarige
2016-10-20 15:45:17 +00:00
parent 8169e81e9a
commit 359dc73526

View File

@@ -57,6 +57,10 @@ class Validator
*/
public function GetRegExp($bWithSlashes = false)
{
if ($bWithSlashes)
{
$this->sRegExp = str_replace('/', '\\/', $this->sRegExp);
}
return ($bWithSlashes) ? '/' . $this->sRegExp . '/' : $this->sRegExp;
}