Fix a fatal error when an undo doesn't contain an object

2022.09-rc
Michael 2020-05-14 04:53:56 +00:00
rodzic 3dc231ffd6
commit 079738a8b5
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -274,7 +274,7 @@ class Receiver
$object_data['object_type'] = JsonLD::fetchElement($activity['as:object'], '@type');
// An Undo is done on the object of an object, so we need that type as well
if ($type == 'as:Undo') {
if (($type == 'as:Undo') && !empty($object_data['object_object'])) {
$object_data['object_object_type'] = self::fetchObjectType([], $object_data['object_object'], $uid);
}
}