From: moodler Date: Tue, 14 Aug 2007 02:11:33 +0000 (+0000) Subject: Removed some pass-by-references to remove notices X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b58db965b46c9c2213caff437dcaad662bf64732;p=moodle.git Removed some pass-by-references to remove notices --- diff --git a/lib/phpxml/xml.php b/lib/phpxml/xml.php index 77262855ed..fdd5a2e1f8 100644 --- a/lib/phpxml/xml.php +++ b/lib/phpxml/xml.php @@ -60,17 +60,17 @@ class XML{ function XML(){ $this->parser = &xml_parser_create(); - xml_parser_set_option(&$this->parser, XML_OPTION_CASE_FOLDING, false); - xml_set_object(&$this->parser, &$this); - xml_set_element_handler(&$this->parser, 'open','close'); - xml_set_character_data_handler(&$this->parser, 'data'); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); + xml_set_object($this->parser, $this); + xml_set_element_handler($this->parser, 'open','close'); + xml_set_character_data_handler($this->parser, 'data'); } - function destruct(){ xml_parser_free(&$this->parser); } + function destruct(){ xml_parser_free($this->parser); } function & parse(&$data){ $this->document = array(); $this->stack = array(); $this->parent = &$this->document; - return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL; + return xml_parse($this->parser, $data, true) ? $this->document : NULL; } function open(&$parser, $tag, $attributes){ $this->data = ''; #stores temporary cdata @@ -114,4 +114,4 @@ class XML{ function count_numeric_items(&$array){ return is_array($array) ? count(array_filter(array_keys($array), 'is_numeric')) : 0; } -?> \ No newline at end of file +?>