mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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
This commit is contained in:
parent
a175687bd5
commit
709e257707
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue