PHP Classes

Deprecated method

Recommend this page to a friend!

      simple XML  >  All threads  >  Deprecated method  >  (Un) Subscribe thread alerts  
Subject:Deprecated method
Summary:How to change the call-time pass-by-reference
Messages:4
Author:Mathieu Gelinas
Date:2007-06-19 21:28:57
Update:2010-06-22 20:11:16
 

  1. Deprecated method   Reply   Report abuse  
Picture of Mathieu Gelinas Mathieu Gelinas - 2007-06-19 21:28:57
How should I modify the code so I stop receiving the warning message:

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 [runtime function name]()

  2. Re: Deprecated method   Reply   Report abuse  
Picture of matteo zanin matteo zanin - 2007-09-10 09:19:01 - In reply to message 1 from Mathieu Gelinas
I have the same problem. Solutions?

  3. Re: Deprecated method   Reply   Report abuse  
Picture of Markus Möller Markus Möller - 2007-09-11 08:55:43 - In reply to message 2 from matteo zanin
Change the constructor of the XML_TAG class like this:
OLD: function xml_tag($parent)
NEW: function xml_tag(&$parent)

When you added the & to the constructor you can remove it at the tag_open()-method:

OLD: $tag=new XML_TAG(&$this->_actual_tag);
NEW: $tag=new XML_TAG($this->_actual_tag);


Br
Markus

  4. Re: Deprecated method   Reply   Report abuse  
Picture of Oliver Strecke Oliver Strecke - 2010-06-22 20:11:16 - In reply to message 1 from Mathieu Gelinas
Thx Markus for the solution!
This was fixed and implemented in the actual version.