Bug #19277 [Com]: Writing Formula, PHP Fatal error: Writer/Parser.php on line 1440

From: Date: Mon, 30 Apr 2012 15:19:58 +0000
Subject: Bug #19277 [Com]: Writing Formula, PHP Fatal error: Writer/Parser.php on line 1440
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8593@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=19277&edit=1 ID: 19277 Comment by: acidhexe Reported By: acidhexe at gmx dot de Summary: Writing Formula, PHP Fatal error: Writer/Parser.php on line 1440 Status: Open Type: Bug Package: Spreadsheet_Excel_Writer Operating System: Ubuntu Package Version: 0.9.3 PHP Version: 5.3.9 New Comment: Hi, i have the same error after pear upgrade-all to 0.9.3. and PHP 5.3.8 on Win Server 2008 R2 Previous Comments: ------------------------------------------------------------------------ [2012-02-07 11:13:41] tinoschubert both, 0.9.2 and 0.9.3. ------------------------------------------------------------------------ [2012-02-06 15:05:14] doconnor Hi Tino, does it affect you with 0.9.2? ------------------------------------------------------------------------ [2012-02-06 08:55:36] tinoschubert Description: ------------ If you want to add a not 100% corrent formula (like sum(B2:B)) within a Excel Sheet, Excel Writer produces a fatal error. Even an exception handler is not able to catch this Error. I know, that the function, i want to insert is not 100% correct, but it should not end in a fatal error. Test script: --------------- require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer('formula.xls'); $worksheet = $workbook->addWorksheet(); $worksheet->write(0, 0, 2); $worksheet->write(0, 1, "and"); $worksheet->write(0, 2, 2); $worksheet->write(0, 3, "makes"); try { $worksheet->writeFormula(0, 4, "=SUM(A1:A)"); // =Sum(A1:A) produces the fatal error, =SUM(A1:A3) works } catch (Exception $e) { echo ' catch Exception', $e->getMessage(), "\n"; } $workbook->close(); Expected result: ---------------- Deprecated: Call-time pass-by-reference has been deprecated in /usr/share/php/Spreadsheet/Excel/Writer/Worksheet.php on line 2490 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /usr/share/php/Spreadsheet/Excel/Writer/Parser.php on line 1440 Actual result: -------------- I think the _match function is not working correctly. But i'm not sure. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=19277&edit=1

« previous php.pear.bugs (#8593) next »