From: Evan Prodromou Date: Tue, 19 Jul 2011 20:18:29 +0000 (-0400) Subject: Avoid slurping objects recursively in activity parsing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c86f0ffa2f7059089910b38aadd2fc018ce6d718;p=quix0rs-gnu-social.git Avoid slurping objects recursively in activity parsing --- diff --git a/lib/activity.php b/lib/activity.php index f5590047d4..12ea53a9fe 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -176,6 +176,10 @@ class Activity if ($objectEls->length > 0) { for ($i = 0; $i < $objectEls->length; $i++) { $objectEl = $objectEls->item($i); + // Only immediate children (don't slurp embedded activities' objects!) + if ($objectEl->parentNode != $entry) { + continue; + } // Special case for embedded activities $objectType = ActivityUtils::childContent($objectEl, self::OBJECTTYPE, self::SPEC); if (!empty($objectType) && $objectType == ActivityObject::ACTIVITY) {