Avoid slurping objects recursively in activity parsing

This commit is contained in:
Evan Prodromou 2011-07-19 16:18:29 -04:00
parent 22b565a937
commit c86f0ffa2f

View File

@ -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) {