Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #19277 Writing Formula, PHP Fatal error: Writer/Parser.php on line 1440
Submitted: 2012-02-06 13:55 UTC
From: tinoschubert Assigned:
Status: Feedback Package: Spreadsheet_Excel_Writer (version 0.9.3)
PHP Version: 5.3.9 OS: Ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2012-02-06 13:55 UTC] tinoschubert (Tino Schubert)
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.

Comments

 [2012-02-06 20:05 UTC] doconnor (Daniel O'Connor)
Hi Tino, does it affect you with 0.9.2?
 [2012-02-07 16:13 UTC] tinoschubert (Tino Schubert)
both, 0.9.2 and 0.9.3.
 [2012-04-30 20:17 UTC] acidhexe (acid hexe)
Hi, i have the same error after pear upgrade-all to 0.9.3. and PHP 5.3.8 on Win Server 2008 R2
 [2016-08-23 06:53 UTC] sanmai (Alexey Kopytko)
-Status: Open +Status: Feedback
Thank you for taking the time to report a problem with the package. This problem may have been already fixed by a previous change that is in the SVN of the package. Please checking out the SVN repository of this package and upgrade svn checkout svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk pear upgrade package2.xml or pear upgrade package.xml If you are able to reproduce the bug with the latest SVN, please change the status back to "Open". Again, thank you for your continued support of PEAR.
 [2016-08-23 06:54 UTC] sanmai (Alexey Kopytko)
Instead of svn checkout use: git clone https://github.com/pear/Spreadsheet_Excel_Writer.git