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

Bug #5066 Reference Notices
Submitted: 2005-08-11 15:19 UTC
From: mike Assigned: nosey
Status: Closed Package: Image_Graph
PHP Version: 4.4.0 OS: Win32
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 50 + 26 = ?

 [2005-08-11 15:19 UTC] mike
Description: ------------ There are lots of PHP-4.4/5 reference notices plugged in the code. Just FYI.


 [2005-08-24 17:43 UTC] pear dot nosey at veggerby dot dk
Are we talking strict mode notices or "call-time pass by ref" notices? (or are they warnings?).
 [2005-08-24 18:46 UTC] mike
Neither :) They're E_NOTICE of type "only varibales can be returned by reference". Fixable by writing: function &foo() { $obj = &new Obj(); return $obj; }
 [2005-08-24 20:38 UTC] pear dot nosey at veggerby dot dk
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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. Okay, thanks. They should now be fixed.
 [2006-06-28 15:46 UTC] koto at webworkers dot pl (koto)
At least one more reference error is left: Only variables should be assigned by reference in PEAR/Image/Graph/Common.php on line 128 This error message is being sent to the browser and - as a result - graph does not display. The line mentioned is (in _reset() method): $result =& $this->_elements[$key]->_reset(); What happens is that the _reset() method of certain element classes does not always return a value (and it must return something - even null - if the result value is assigned to $result by reference) For example - Image_Graph_Axis: function _reset() { parent::_reset(); $this->_labelText = array(); } There is no return value. Even a simple return null at the end would help. There is a similar error report at