[phpXML] Bug in setAttributes
Brought to you by:
bs_php,
nigelswinson
From: <a.t...@fl...> - 2001-10-08 14:44:35
|
Hi, just patched phpxml 1.N.5: // OLD -------------------------------------------------- function setAttributes($absoluteXPath, $attribute) { // The attributes parameter should be an associative array. if (!is_array($attributes)) return; // Add the attributes to the node. if (isSet($this->nodes[$path]['attributes'])) { $this->nodes[$path]['attributes'] = array_merge($this->nodes[$path]['attributes'], $attributes); } else { $this->nodes[$path]['attributes'] = $attributes; } } Tell me where the $path variableis set and why the parameter $attribute is called $attributes in the function... // NEW -------------------------------------------------- function setAttributes($absoluteXPath, $attributes) { // The attributes parameter should be an associative array. if (!is_array($attributes)) return; // Add the attributes to the node. if (isSet($this->nodes[$absoluteXPath]['attributes'])) { $this->nodes[$absoluteXPath]['attributes'] = array_merge($this->nodes [$absoluteXPath]['attributes'], $attributes); } else { $this->nodes[$absoluteXPath]['attributes'] = $attributes; } } BTW, did anyone check the code before releasing it? How else could one miss those bugs like the "$this ->" thing and the setAttributes-function, that did not work at all. CU, Axel -- a.t...@fl... PS, soory for my bad english... -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |