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

Bug #16678 In PHP 5.3 get errors on lines 186, 195
Submitted: 2009-10-05 18:53 UTC
From: steinerd Assigned: doconnor
Status: Closed Package: Spreadsheet_Excel_Writer (version 0.9.1)
PHP Version: 5.3.0 OS: Windows 2003 Server
Roadmaps: (Not assigned)    
Subscription  


 [2009-10-05 18:53 UTC] steinerd (Denver Steiner)
Description: ------------ Deprecated: Assigning the return value of new by reference is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Workbook.php on line 186 Deprecated: Assigning the return value of new by reference is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Workbook.php on line 195 186 & $this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version); 195 & $this->_tmp_format = new Spreadsheet_Excel_Writer_Format($this->_BIFF_version); Test script: --------------- 186 $this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version); 195 $this->_tmp_format = new Spreadsheet_Excel_Writer_Format($this->_BIFF_version); //Removed the "&" in both these lines Expected result: ---------------- This fixed my problem in PHP 5.3

Comments

 [2009-10-05 19:54 UTC] steinerd (Denver Steiner)
-Summary: In PHP 5.3 get bug on lines 186, 195 +Summary: In PHP 5.3 get errors on lines 186, 195
File \Spreadsheet\Excel\Writer\Parser.php: In the File Parser.php, several functions have been depreciated and throw up errors: ereg() Lines: 1209,1217,1224,1231,1237,1243,1249... eregi() Lines: 1266,1524 split() Lines 672,674,720... Deprecated: Function ereg() is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Parser.php on line 1231 Deprecated: Function ereg() is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Parser.php on line 1366 Deprecated: Function ereg() is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Parser.php on line 1261 Deprecated: Function eregi() is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Parser.php on line 1266 Deprecated: Function ereg() is deprecated in C:\websoftware\php\PEAR\Spreadsheet\Excel\Writer\Parser.php on line 1261
 [2009-10-05 20:04 UTC] steinerd (Denver Steiner)
Work around fix: Set my php.ini to: error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED Which removed the depreciated errors, however these issues will need to be addressed for PHP6.0
 [2009-10-19 06:41 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: progi1984
 [2009-11-29 22:46 UTC] cschmitz (Carsten Schmitz)
The current package will remain PHP4 backward compatible that's why only some of these problem can be fixed. We are thinking of releasing a Spreadsheet_Excel_Writer2 package in the future with PHP5 and up compatibility.
 [2010-02-08 20:29 UTC] arronwoods (Arron Woods)
>The current package will remain PHP4 backward compatible that's why only >some of these problem can be fixed. We are thinking of releasing a >Spreadsheet_Excel_Writer2 package in the future with PHP5 and up >compatibility. Any way to maintain a separate 5.3 compatible branch? I was going to just stick up a patched version on my blog for people to download for now but is that the best solution? I'm sure theres a decent reason behind it, but couldn't people not upgrading to PHP5 just use an older version of Spreadsheet_Excel_Writer so the rest of us can benefit? ;)
 [2010-06-15 22:21 UTC] drislipknot (Adriano Belisia)
To solve this problem simply remove the & on the lines 186 and 195 or 180 and 189 (In release 0.9.2). On http://php.net/manual/en/language.references.whatdo.php is showed: "Since PHP 5, new returns a reference automatically, so using =& in this context is deprecated and produces an E_STRICT message."
 [2011-09-29 14:18 UTC] doconnor (Daniel O'Connor)
 [2011-12-10 08:03 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Closed -Assigned To: progi1984 +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.