Skip to content
Browse files

- bug in use of static in getChildByTagName...note with this function…

… that it is going to

move you to the child, so you can't run it twice without first using $xml->parentNode() to get
back to the parent...


git-svn-id: http://svn.php.net/repository/pear/packages/XML_XPath/trunk@73515 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 691c46d commit 4fa074b743fa16d4af497d2c1bbb66f3a5730858 Daniel Allen committed Mar 16, 2002
Showing with 2 additions and 2 deletions.
  1. +2 −2 XPath/common.php
View
4 XPath/common.php
@@ -386,10 +386,10 @@ function getChildByTagName($in_name, $in_index = 1, $in_movePointer = true, $in_
// if we have changed locations, then reset the child array
if ($this->pointer != $previousPointer || $in_clearCache) {
$previousPointer = $this->pointer;
- unset($nameList);
+ $nameList = array();
}
// if the child array is not set, make it now (can be dangerous)
- if (!isset($nameList)) {
+ if (empty($nameList)) {
$childNodes = $this->pointer->children();
settype($children, 'array');
foreach ($childNodes as $childNode) {

0 comments on commit 4fa074b

Please sign in to comment.
Something went wrong with that request. Please try again.