diff --git a/lib/Doctrine/Lib.php b/lib/Doctrine/Lib.php index ded078f87..f8d8b05b7 100644 --- a/lib/Doctrine/Lib.php +++ b/lib/Doctrine/Lib.php @@ -88,7 +88,7 @@ class Doctrine_Lib $collectionName = Doctrine_Lib::plurelize($collection->getTable()->name); if ( ! isset($incomming_xml)) { - $new_xml_string = "<" . $recordname . ">"; + $new_xml_string = "<" . $collectionName . ">"; $xml = new SimpleXMLElement($new_xml_string); } else { $xml = $incomming_xml->addChild($collectionName); @@ -122,7 +122,7 @@ class Doctrine_Lib { $recordname = $record->getTable()->name; if (!isset($incomming_xml)) { - $new_xml_string = "<" . $collection_name . ">"; + $new_xml_string = "<" . $recordname . ">"; $xml = new SimpleXMLElement($new_xml_string); }else{ $xml = $incomming_xml->addChild($recordname);