Index: branches/RC/core/units/general/xml_helper.php =================================================================== diff -u -r9297 -r9313 --- branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 9297) +++ branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 9313) @@ -29,14 +29,17 @@ xml_get_current_line_number($xml_parser)), E_USER_WARNING); } xml_parser_free($xml_parser); - return $this->RootElement; + + $root_copy = $this->RootElement; + + return $root_copy; } function startElement(&$Parser, &$Elem, $Attrs) { $parent =& $this->CurrentElement; // 1. $parent is now reference to $this->CurrentElement $this->CurrentElement =& new kXMLNode($Elem, $Attrs); // 2. =& ensures, that new object won't be assigned to $parent as well (don't remove) - if (is_null($this->RootElement)) { + if (!isset($this->RootElement) || is_null($this->RootElement)) { $this->RootElement =& $this->CurrentElement; } if (!is_null($parent)) { @@ -58,8 +61,8 @@ function Clear() { - $this->RootElement = null; - $this->CurrentElement = null; + unset($this->RootElement); + unset($this->CurrentElement); } }