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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Dec 22 01:01:30 2024 UTC