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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 15:01:31 2025 UTC