Add spreadsheet-excel-writer patch to fix pass-by-reference error
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 6 Jan 2014 16:49:33 +0000 (11:49 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Fri, 24 Jan 2014 03:54:32 +0000 (22:54 -0500)
bomgen/README
bomgen/patch/spreadsheet-excel-writer-fix-pass-by-reference.patch [new file with mode: 0644]

index 9fe1a88..3b2c3cb 100644 (file)
@@ -11,6 +11,11 @@ separate line.
 
 Installation of PHP Spreadsheet_Excel_Writer module:
 
+  $> sudo apt-get install php-pear
   $> sudo pear install OLE channel://pear.php.net/OLE-1.0.0RC2
   $> sudo pear install Spreadsheet_Excel_Writer \
      channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.3
+
+  $> cd /usr/share/php
+  $> sudo patch -Np1 -i spreadsheet-excel-writer-fix-pass-by-reference.patch
+
diff --git a/bomgen/patch/spreadsheet-excel-writer-fix-pass-by-reference.patch b/bomgen/patch/spreadsheet-excel-writer-fix-pass-by-reference.patch
new file mode 100644 (file)
index 0000000..643a7dc
--- /dev/null
@@ -0,0 +1,17 @@
+Fix this error:
+
+  PHP Fatal error:  Call-time pass-by-reference has been removed in /usr/share/php/Spreadsheet/Excel/Writer/Worksheet.php on line 2490
+
+diff -Naur orig/Spreadsheet/Excel/Writer/Worksheet.php new/Spreadsheet/Excel/Writer/Worksheet.php
+--- orig/Spreadsheet/Excel/Writer/Worksheet.php        2014-01-06 11:42:54.901378977 -0500
++++ new/Spreadsheet/Excel/Writer/Worksheet.php 2014-01-06 11:45:03.717374367 -0500
+@@ -2486,8 +2486,7 @@
+             $data     = pack('v',  count($ranges));
+             foreach($ranges as $range) 
+               $data .= pack('vvvv', $range[0], $range[2], $range[1], $range[3]);
+-            $string=$header.$data;
+-            $this->_append(&$string, true);
++            $this->_append($header.$data, true);
+           }
+     }