Moved years in default COAs one year forward.
[fa-stable.git] / reporting / includes / pdf_report.inc
index 0d699731e75fbbdeaf80ac54f3a215b4e2031b1a..ecb31b0e46a5c3620bf1d3b2b08a9600f75d6f68 100644 (file)
@@ -743,7 +743,7 @@ class FrontReport extends Cpdf
 
        function TextWrap($xpos, $ypos, $len, $str, $align = 'left', $border = 0, $fill = 0, $link = NULL, $stretch = 1, $spacebreak=false)
        {
-               $str = strtr($str, array("\r"=>''));
+               $str = ($str != NULL ? strtr($str, array("\r"=>'')) : "");
 
                if ($this->fontSize != $this->oldFontSize)
                {
@@ -799,7 +799,7 @@ class FrontReport extends Cpdf
 
        function TextWrapLines($c, $width, $txt, $align='left', $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)
        {
-               $str = explode("\n", $txt);
+               $str = ($txt != NULL ? explode("\n", $txt) : array());
 
                for ($i = 0; $i < count($str); $i++)
                {