fix unknown modifier "n" warning caused by a "/" in replacement

This commit is contained in:
Ralf Becker 2014-11-18 12:28:20 +00:00
parent 97acbbb70f
commit be66f13885

View File

@ -1359,7 +1359,7 @@ abstract class bo_merge
{ {
if (array_key_exists('$$'.$param[4].'$$',$this->replacements)) $param[4] = $this->replacements['$$'.$param[4].'$$']; if (array_key_exists('$$'.$param[4].'$$',$this->replacements)) $param[4] = $this->replacements['$$'.$param[4].'$$'];
if (array_key_exists('$$'.$param[3].'$$',$this->replacements)) $param[3] = $this->replacements['$$'.$param[3].'$$']; if (array_key_exists('$$'.$param[3].'$$',$this->replacements)) $param[3] = $this->replacements['$$'.$param[3].'$$'];
$replace = preg_match('/'.$param[2].'/',$this->replacements['$$'.$param[1].'$$']) ? $param[3] : $param[4]; $replace = preg_match('/'.preg_quote($param[2], '/').'/',$this->replacements['$$'.$param[1].'$$']) ? $param[3] : $param[4];
switch($this->mimetype) switch($this->mimetype)
{ {
case 'application/vnd.oasis.opendocument.text': // open office case 'application/vnd.oasis.opendocument.text': // open office