[TheFreeNetwork][fix_duplicates.php] Don't die because you couldn't federate an undo follow

This commit is contained in:
Diogo Cordeiro
2020-08-04 13:03:33 +01:00
committed by Diogo Peralta Cordeiro
parent f81b578a37
commit 4dfa7f374a
4 changed files with 41 additions and 24 deletions

View File

@@ -43,11 +43,16 @@ class Salmon
*
* @param string $endpoint_uri
* @param string $xml string representation of payload
* @param Profile $user profile whose keys we sign with (must be a local user)
* @return boolean success
* @param Profile $actor profile whose keys we sign with (must be a local user)
* @param Profile|null $target
* @return bool success
*/
public static function post($endpoint_uri, $xml, Profile $actor, Profile $target=null)
{
public static function post(
$endpoint_uri,
$xml,
Profile $actor,
?Profile $target = null
) {
if (empty($endpoint_uri)) {
common_debug('No endpoint URI for Salmon post to '.$actor->getUri());
return false;