Patch xml-set-object.xml

From: Date: Mon, 24 Jun 2002 12:35:59 +0000
Subject: Patch xml-set-object.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969346937@lists.php.net to get a copy of this message
Due the amount of people asking and filling bugs report on this issue I would like to recommend this patch for the documentation of this function. Thanks, Tomas V.V.Cox

--- xml-set-object.xml Mon Jun 24 14:28:59 2002 +++ xml-set-object.xml.new Mon Jun 24 14:31:03 2002 @@ -11,7 +11,7 @@ <methodsynopsis> <type>void</type><methodname>xml_set_object</methodname> <methodparam><type>resource</type><parameter>parser</parameter></methodparam> - <methodparam><type>object</type><parameter>&amp;object</parameter></methodparam> + <methodparam><type>object</type><parameter>object</parameter></methodparam> </methodsynopsis> <para> This function allows to use <parameter>parser</parameter> inside @@ -29,7 +29,7 @@ { $this->parser = xml_parser_create(); - xml_set_object($this->parser, &$this); + xml_set_object($this->parser, $this); xml_set_element_handler($this->parser, "tag_open", "tag_close"); xml_set_character_data_handler($this->parser, "cdata"); } @@ -56,7 +56,8 @@ } // end of class xml -$xml_parser = new xml(); +// NOTE! The object should be created by reference +$xml_parser = &new xml(); $xml_parser->parse("<A ID='hallo'>PHP</A>"); ?> ]]>
« previous php.doc (#969346937) next »