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

Bug #16077 PEAR5::getStaticProperty does not return a reference to the property
Submitted: 2009-04-07 16:18 UTC Modified: 2009-04-09 00:33 UTC
From: mtorromeo Assigned: dufuz
Status: Closed Package: PEAR (version 1.8.0RC1)
PHP Version: 5.2.9 OS: Linux
Roadmaps: 1.8.0    
Subscription  


 [2009-04-07 16:18 UTC] mtorromeo (Massimiliano Torromeo)
Description: ------------ PEAR5::getStaticProperty is returning the value of the property instead of the reference. The method is declared as: static function getStaticProperty($class, $var) The fixed declaration: static function &getStaticProperty($class, $var) Test script: --------------- <?php require_once 'PEAR.php'; $skiptrace =& PEAR5::getStaticProperty('PEAR_Error', 'skiptrace'); $skiptrace = true; var_dump(PEAR5::getStaticProperty('PEAR_Error', 'skiptrace')); Expected result: ---------------- boolean true Actual result: -------------- null

Comments

 [2009-04-09 00:33 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Open +Status: Closed -Assigned To: +Assigned To: dufuz -Roadmap Versions: +Roadmap Versions: 1.8.0RC2
This bug has been fixed in CVS. 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.