disappearing data bug fix
Brought to you by:
bs_php,
nigelswinson
From: <chr...@ma...> - 2001-12-11 01:03:00
|
sorry about that last one....been a long day :( i've encountered a bug in 2.1b which i reported (#491220). seems that if you have the following xml: <item><data>0</data><data>1</data></item> importing then exporting results in <item><data/><data>1</data></item> basically losing the '0' i've fixed the problem on 2.1b (unfortunately i am behind corp firewall and can't checkout cvs version) here is the diff for XPath.class.php: 1676c1676,1677 < if (empty($theNode['text'])) { --- > if(!isset($theNode['text'])) { > //if (empty($theNode['text'])) { 1681c1682,1683 < $useShortEnd = (!$hasChildren && empty($mergedText)); --- > $useShortEnd = (!$hasChildren && !isset($mergedText)); > //$useShortEnd = (!$hasChildren && empty($mergedText)); 1821c1823,1824 < if (trim($this->xmlTxtBuffer) OR trim($text)) { --- > if (trim($this->xmlTxtBuffer) != '' OR trim($text) != '') { > // if (trim($this->xmlTxtBuffer) OR trim($text)) { Christopher Hall Software Engineer III Sprint - OSS/ASE/TDG 813-237-4276 800-724-3329/382-0658 |