]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use integer iterator for childNodes in ActivityUtils::getLinks()
authorEvan Prodromou <evan@status.net>
Mon, 30 May 2011 13:57:11 +0000 (09:57 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 30 May 2011 13:57:11 +0000 (09:57 -0400)
lib/activityutils.php

index 3aa09deb4e7761f7812a0007506726d3f26baf02..59f7cdcf3a987d9290609e163427f639bdd5678a 100644 (file)
@@ -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);