diff --git a/composer.json b/composer.json index 2090075024..4acfe7e41a 100644 --- a/composer.json +++ b/composer.json @@ -152,7 +152,7 @@ "mikey179/vfsstream": "^1.6", "mockery/mockery": "^1.3", "php-mock/php-mock-phpunit": "^2.10", - "phpstan/phpstan": "^1.12", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^9" }, "scripts": { diff --git a/composer.lock b/composer.lock index 7d1e831b14..8d200a3f67 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "11175d4e9806e8a5069d010140431af1", + "content-hash": "3e31a2243fb69e47e1b7000cca946fa2", "packages": [ { "name": "asika/simple-console", @@ -4834,20 +4834,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.7", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" + "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d", + "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -4888,7 +4888,7 @@ "type": "github" } ], - "time": "2024-10-18T11:12:07+00:00" + "time": "2024-11-11T15:43:04+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 0f8184d3db..06bedd4eba 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -1899,7 +1899,10 @@ class Receiver if (in_array(-1, $object_data['receiver'])) { $object_data['unlisted'] = true; unset($object_data['receiver'][-1]); - unset($object_data['reception_type'][-1]); + + if (array_key_exists(-1, $object_data['reception_type'])) { + unset($object_data['reception_type'][-1]); + } } return $object_data;