Removed some pass-by-references to remove notices

This commit is contained in:
moodler
2007-08-14 02:11:33 +00:00
parent 2524b0f24c
commit b58db965b4
+7 -7
View File
@@ -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;
}
?>
?>