OStatus: check only direct children in ActivityUtil::child; fixes pulling actor's info when we wanted post info
This commit is contained in:
parent
880acb05b0
commit
014a32e6b8
@ -106,12 +106,16 @@ class ActivityUtils
|
||||
|
||||
static function child($element, $tag, $namespace=self::ATOM)
|
||||
{
|
||||
$els = $element->getElementsByTagnameNS($namespace, $tag);
|
||||
|
||||
$els = $element->childNodes;
|
||||
if (empty($els) || $els->length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return $els->item(0);
|
||||
for ($i = 0; $i < $els->length; $i++) {
|
||||
$el = $els->item($i);
|
||||
if ($el->localName == $tag && $el->namespaceURI == $namespace) {
|
||||
return $el;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user