ID: 14794
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: xml_set_object() should take object by-reference
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux 2.4 / Apache 1.3
PHP Version: 4.1.1
New Comment:

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!

Previous Comments:
------------------------------------------------------------------------

[2002-01-02 03:28:52] [EMAIL PROTECTED]

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!

------------------------------------------------------------------------

[2002-01-02 02:19:32] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14794&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to