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
--
[EMAIL PROTECTED]

PS, soory for my bad english...

--
This message has been sent through the <phpXML/> user discussion list. To unsubscribe, 
please visit https:[EMAIL PROTECTED]/

_______________________________________________
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc

Reply via email to