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

Bug #361 patch: return non-variables by reference
Submitted: 2003-12-05 15:48 UTC
From: danielc Assigned: danielc
Status: Closed Package: DB
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2003-12-05 15:48 UTC] danielc
Description: ------------ Returning non-variables in methods that are written to return references causes problems. In PHP 4, memory is corrupted. In PHP 5, this behavior is presently restricted in some cases, which are enforced by fatal errors. A patch exists at http://www.analysisandsolutions.com/pear/DB.references2.diff When applied, also close out bug #333 http://pear.php.net/bugs/bug.php?id=333&edit=2

Comments

 [2003-12-05 21:56 UTC] lsmith
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.
 [2003-12-10 18:58 UTC] danielc
The bug fixes created inconsistencies regarding DB_common::raiseError(). raiseError() returns by reference but calls to the method don't take advantage of it (ie: "= $this->raiseError"). While this isn't a big deal, it would be nice to get it cleaned up to avoid confusion. Pick ONE of the two patches below to resolve this issue. http://www.analysisandsolutions.com/pear/DB.raiseerror.noref.diff http://www.analysisandsolutions.com/pear/DB.raiseerror.ref.diff
 [2003-12-31 05:01 UTC] danielc
Fixed in CVS.