diff --git a/include/class/document.class.php b/include/class/document.class.php index d32af6d63..726bdd36b 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -1800,6 +1800,7 @@ class Document static function replace_value($p_buffer, $p_pattern, $p_value, $p_limit=-1, $p_type='OOo') { $check=$p_pattern; + $p_value=$p_value??''; $check=str_replace(['<', '>', '<', '>', '='], "", $check); if (preg_replace('/[^[:alnum:]^_]/', '', $check)!=$check) { @@ -1822,7 +1823,7 @@ class Document } if ($count==0) { - $p_value=''; + if ($p_type=='OOo') { $p_value=noalyss_str_replace('&', '&', $p_value);