From 709e257707185b282cbfc1be56c6af568e7f5962 Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 6 Feb 2007 17:19:11 +0000 Subject: [PATCH] Fixing null child reference issue in XML git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4461 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/xml.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cake/libs/xml.php b/cake/libs/xml.php index 82c350c7b..479e2d1d4 100644 --- a/cake/libs/xml.php +++ b/cake/libs/xml.php @@ -505,6 +505,8 @@ class XMLNode extends Object { * */ function &child($id) { + $null = null; + if(is_int($id)) { if(isset($this->children[$id])) { return $this->children[$id]; @@ -517,9 +519,9 @@ class XMLNode extends Object { return $this->children[$i]; } } - return null; + return $null; } else { - return null; + return $null; } } /**