From: Evan Prodromou Date: Mon, 30 May 2011 13:57:11 +0000 (-0400) Subject: use integer iterator for childNodes in ActivityUtils::getLinks() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=97debbab68ea6bc42ebd0d00e51500019bbcd1c0;p=quix0rs-gnu-social.git use integer iterator for childNodes in ActivityUtils::getLinks() --- diff --git a/lib/activityutils.php b/lib/activityutils.php index 3aa09deb4e..59f7cdcf3a 100644 --- a/lib/activityutils.php +++ b/lib/activityutils.php @@ -104,8 +104,9 @@ class ActivityUtils { $els = $element->childNodes; $out = array(); - - foreach ($els as $link) { + + for ($i = 0; $i < $els->length; $i++) { + $link = $els->item($i); if ($link->localName == self::LINK && $link->namespaceURI == self::ATOM) { $linkRel = $link->getAttribute(self::REL); $linkType = $link->getAttribute(self::TYPE);