Fixed multiply strict warnings, fixed error handling on php 5.3
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 7 Dec 2010 08:04:00 +0000 (08:04 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 7 Dec 2010 08:04:00 +0000 (08:04 +0000)
config.default.php
reporting/includes/class.pdf.inc
reporting/includes/pdf_report.inc
reporting/includes/tcpdf.php

index e69595f31d4cd44c390d7e5b48760d4295eb92f5..09dc03a1ca43413be94626c84f60d672b4259480 100644 (file)
@@ -20,6 +20,8 @@
 
 if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
        die("Restricted access");
+       if (!defined(E_STRICT))
+               define('E_STRICT', 2048);       // for php4
        // Log file for error/warning messages. Should be set to any location
        // writable by www server. When set to empty string logging is switched off. 
        // Special value 'syslog' can be used for system logger usage (see php manual).
@@ -39,7 +41,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_
        $select_trail   = 0; // track also SELECT queries
        if ($go_debug > 0)
        {
-               error_reporting(E_ALL);
+               error_reporting(E_ALL&E_STRICT);
                ini_set("display_errors", "On");
        }
        else
index 0bf38d8f1756f9d0dc7532e6b76540d734a16a6a..44b62b4326d6b0c3664eda439f9ab5f11d8e9bd3 100644 (file)
@@ -251,7 +251,7 @@ class Cpdf extends FPDI {
        * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a
        * pretty crappy shape at 2, as we are approximating with bezier curves.
        */
-       function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0)
+       function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0, $dummy=null)
        {
                parent::Ellipse($x0, $y0, $r1, $r2, $angle, $astart. $afinish, ($close?'C':''), "", "", $nSeg);
        }
index 6eb0b89e49da630b7ba4bdb24b674b9e4fd13d5f..daacbd2dbbb26a010b6fd3c82b790f1833130a5c 100644 (file)
@@ -715,25 +715,6 @@ class FrontReport extends Cpdf
                return $drawColor;
        }
        
-       function SetDrawColor($r, $g, $b)
-       {
-               parent::SetDrawColor($r, $g, $b);
-       }
-
-       function SetTextColor($r, $g, $b)
-       {
-               parent::SetTextColor($r, $g, $b);
-       }
-
-       /**
-     * Set the fill color for table cells.
-     * @see reporting/includes/TCPDF#SetFillColor($col1, $col2, $col3, $col4)
-     */
-       function SetFillColor($r, $g, $b)
-       {
-               parent::SetFillColor($r, $g, $b);
-       }
-
        // Get current cell padding setting from TCPDF object
        function GetCellPadding()
        {
@@ -867,7 +848,7 @@ class FrontReport extends Cpdf
                parent::line($from, $row, $to, $row2);
        }
 
-       function Line($row, $height = 0)
+       function Line($row, $height = 0, $dummy1=null, $dummy2=null, $dummy3=null)
        {
                $oldLineWidth = $this->GetLineWidth();
                $this->SetLineWidth($height + 1);
index 8f21785532568bc0abfa6c377eac59ae98cf8210..326ffa611c14fd488b81e29af0b037c411952d4f 100644 (file)
@@ -3597,8 +3597,8 @@ if (!class_exists('TCPDF')) {
                                if ($type == "jpg") {
                                        $type = "jpeg";
                                }
-                               $mqr = get_magic_quotes_runtime();
-                               set_magic_quotes_runtime(0);
+                               $mqr = ini_get('magic_quotes_runtime');
+                               ini_set('magic_quotes_runtime', 0);
                                // Specific image handlers
                                $mtd = '_parse'.$type;
                                // GD image handler function
@@ -3625,7 +3625,7 @@ if (!class_exists('TCPDF')) {
                                        //If false, we cannot process image
                                        return;
                                }
-                               set_magic_quotes_runtime($mqr);
+                               ini_set('magic_quotes_runtime', $mqr);
                                $info['i'] = count($this->images) + 1;
                                // add image to document
                                $this->images[$file] = $info;
@@ -4505,8 +4505,8 @@ if (!class_exists('TCPDF')) {
                                $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
                                $this->_out('endobj');
                        }
-                       $mqr = get_magic_quotes_runtime();
-                       set_magic_quotes_runtime(0);
+                       $mqr = ini_get('magic_quotes_runtime');
+                       ini_set('magic_quotes_runtime', 0);
                        foreach($this->FontFiles as $file => $info) {
                                //Font file embedding
                                $this->_newobj();
@@ -4536,7 +4536,7 @@ if (!class_exists('TCPDF')) {
                                $this->_putstream($font);
                                $this->_out('endobj');
                        }
-                       set_magic_quotes_runtime($mqr);
+                       ini_set('magic_quotes_runtime', $mgr);
                        foreach($this->fonts as $k => $font) {
                                //Font objects
                                $this->fonts[$k]['n'] = $this->n + 1;