]> git.mxchange.org Git - friendica.git/commitdiff
Fix a fatal error when an undo doesn't contain an object
authorMichael <heluecht@pirati.ca>
Thu, 14 May 2020 04:53:56 +0000 (04:53 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 14 May 2020 04:53:56 +0000 (04:53 +0000)
src/Protocol/ActivityPub/Receiver.php

index 384f5b5952ac8bd7b67ed9eaf3dd6a90ec29d50b..603d06fb8a7f1e34fe46e3055c7d840f22362de3 100644 (file)
@@ -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);
                        }
                }