PEAR-Spreadsheet_Excel_Writer crashes with the following error: Warning: Wrong parameter count for array_push() in /usr/lib/php/Spreadsheet/Excel/Writer/Workbook.php on line 1448 Notes: o The problem is that the program is using an array_push where it wants to be using array_pop. o This bug has been fixed in the latest release on pear.php.net (V1.7) Reproducible: Always Steps to Reproduce: Save the following code as 'example.php' and run the command: php example.php <?php require_once 'Spreadsheet/Excel/Writer.php'; // We give the path to our file here $workbook = new Spreadsheet_Excel_Writer('test.xls'); // Setup to use Excel 97 format $workbook->setVersion(8); // Create a long string. Make sure it is greater than 255 characters... // $astring = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; $mystring = $astring.$astring.$astring.$astring.$astring.$string.$astring.$astring; //Prepare the first sheet... $mworksheet =& $workbook->addWorksheet('My Example'); $mworksheet->writeString(0, 0, 'Header 1'); $mworksheet->writeString(0, 1, 'Header 2'); $mworksheet->writeString(0, 2, 'Header 3'); $mworksheet->WriteString(0, 3, 'Header 4'); $mworksheet->setColumn(0,0, 50); $mworksheet->setColumn(1,1, 20); $mworksheet->setColumn(3,3, 50); //Write to the spreadsheet for ($row = 1; $row < 100; $row++) { $mworksheet->writeString($row,0,$mystring); $mworksheet->writeURL($row,3,"http://www.dummy.org/".$mystring); // // Rotate the string, else it recognises that it has already saved it! // $first = substr($mystring,0,1); $rest = substr($mystring,1); $mystring = $rest.$first; } // We still need to explicitly close the workbook $workbook->close(); ?> Actual Results: Received the error: Warning: Wrong parameter count for array_push() in /usr/lib/php/Spreadsheet/Excel/Writer/Workbook.php on line 1448 Expected Results: Created and populated an Excel spreadsheet.
New version is now in portage (0.7), sync in half an hour or so to get it.