Merge pull request #10852 from MrPetovan/bug/10844-unfollow-errors

Fix overly strict return value for revokeFollow methods
This commit is contained in:
Tobias Diekershoff 2021-10-09 08:21:31 +02:00 committed by GitHub
commit e51bd33760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -269,7 +269,7 @@ class Protocol
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function revokeFollow(array $contact)
public static function revokeFollow(array $contact): ?bool
{
if (empty($contact['network'])) {
throw new \InvalidArgumentException('Missing network key in contact array');

View file

@ -857,7 +857,7 @@ class Contact
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function revokeFollow(array $contact): bool
public static function revokeFollow(array $contact): ?bool
{
if (empty($contact['network'])) {
throw new \InvalidArgumentException('Empty network in contact array');