php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wez dot php at thebrainroom dot com
New email:
PHP Version: OS:

 

 [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.

--Wez.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-09 05:57 UTC] sterling@php.net
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: Wed Nov 06 06:01:29 2024 UTC