php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14794 xml_set_object() should take object by-reference
Submitted: 2002-01-02 02:19 UTC Modified: 2010-12-29 12:06 UTC
From: vvo at geocities dot com Assigned:
Status: Not a bug Package: XML related
PHP Version: 4.1.1 OS: Linux 2.4 / Apache 1.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vvo at geocities dot com
New email:
PHP Version: OS:

 

 [2002-01-02 02:19 UTC] vvo at geocities dot com
I am getting the following warning after I switched to 'php.ini-recommended':

Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of xml_set_object()... 

Apparently, xml_set_object() takes an object by value, which renders this functionality useless: The only way it's any good is when the object is passed by reference, so that the event-receiving object is the same instance that was passed as a parameter to xml_set_object() call. Otherwise, there is no way for a copied object to pass parsed data out to the caller of xml_set_object() (without global variables, of course).

Please fix xml_set_object() to take an object by reference.

Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-02 03:28 UTC] vvo at geocities dot com
Ok, I am really embarassed now, because xml_set_object() does take object by reference. 

The warning message is misleading though. It convinced me that the parameter was passed by value. But rather, it should say '.. - argument passed according to the function spec', which, in this case, is by-reference.

Thanks!
 [2010-12-29 12:06 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: XML related
 [2010-12-29 12:06 UTC] jani@php.net
Works as expected.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 13:01:47 2020 UTC