Req #14794 [Opn->Bgs]: xml_set_object() should take object by-reference
| From: | jani@php.net | Date: | Wed, 29 Dec 2010 11:06:39 +0000 |
| Subject: | Req #14794 [Opn->Bgs]: xml_set_object() should take object by-reference | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157379@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=14794&edit=1
ID: 14794
Updated by: jani@php.net
Reported by: vvo at geocities dot com
Summary: xml_set_object() should take object by-reference
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: XML related
Operating System: Linux 2.4 / Apache 1.3
PHP Version: 4.1.1
Block user comment: N
Private report: N
New Comment:
Works as expected.
Previous Comments:
------------------------------------------------------------------------
[2002-01-02 03:28:52] 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!
------------------------------------------------------------------------
[2002-01-02 02:19:32] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=14794&edit=1