]> git.mxchange.org Git - friendica.git/commitdiff
Prevent the warning of an Undefined array key "object_object_type"
authorMichael <heluecht@pirati.ca>
Sun, 3 Apr 2022 07:45:15 +0000 (07:45 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 3 Apr 2022 07:45:15 +0000 (07:45 +0000)
src/Protocol/ActivityPub/Receiver.php

index 253e4d63103bf462f73f75a3ab983c6ba8e37b6a..3550f06bc941975137930cb0cf403e60938a91b9 100644 (file)
@@ -733,7 +733,7 @@ class Receiver
                                        in_array($object_data['object_object_type'], array_merge(['as:Tombstone'], self::CONTENT_TYPES))) {
                                        ActivityPub\Processor::undoActivity($object_data);
                                } elseif (in_array($object_data['object_type'], array_merge(self::ACTIVITY_TYPES, ['as:Announce', 'as:Create', ''])) &&
-                                       ($object_data['object_object_type'] == '')) {
+                                       empty($object_data['object_object_type'])) {
                                        // We cannot detect the target object. So we can ignore it.
                                } elseif (in_array($object_data['object_type'], ['as:Create']) &&
                                        in_array($object_data['object_object_type'], ['pt:CacheFile'])) {