|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9447 call_user_method functions do not pass references
Submitted: 2001-02-25 17:05 UTC Modified: 2001-09-09 05:57 UTC
From: wez dot php at thebrainroom dot com Assigned:
Status: Closed Package: Class/Object related
PHP Version: 4.0 Latest CVS (25/02/2001) OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
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:
29 - 24 = ?
Subscribe to this entry?

 [2001-02-25 17:05 UTC] wez dot php at thebrainroom dot com
call_user_method and call_user_method_array functions do not force the object to be passed reference, and the call is made to a copy of the object.

This kills off the use of objects, as when the call returns any changes made to the properties of the object are lost.

I added my own call_user_method_array call to 4.0.4pl1 (prior to it appearing in CVS) which forces the object by reference.

Could we change the behaviour so that the object parameters are passed by reference?  I don't think this will break anyones scripts.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-09 05:57 UTC]
I think this has been implemented, anyway, call_user_method
is outdated, just use call_user_function with the
array(&$obj, "method") syntax.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 16:01:38 2024 UTC