mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:10:10 +00:00
Continued:
- changed back to 'return false;' as other methods heavily rely on false instead of an empty array as pointed out by @heluecht@pirati.ca - $fetched_contact should be initialized as an empty array, let's not make this code more crazier than it already is (see APContact::getByURL())
This commit is contained in:
parent
c467bff79f
commit
36d56a4041
3 changed files with 17 additions and 16 deletions
|
@ -59,12 +59,13 @@ class Notify extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
private static function dispatchPublic($postdata)
|
||||
private static function dispatchPublic(array $postdata)
|
||||
{
|
||||
$msg = Diaspora::decodeRaw($postdata, '', true);
|
||||
if (!$msg) {
|
||||
if (!is_array($msg)) {
|
||||
// We have to fail silently to be able to hand it over to the salmon parser
|
||||
return false;
|
||||
Logger::warning('Diaspora::decodeRaw() has failed for some reason.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch the corresponding public contact
|
||||
|
@ -88,10 +89,10 @@ class Notify extends BaseModule
|
|||
System::xmlExit($ret, 'Done');
|
||||
}
|
||||
|
||||
private static function dispatchPrivate($user, $postdata)
|
||||
private static function dispatchPrivate(array $user, array $postdata)
|
||||
{
|
||||
$msg = Diaspora::decodeRaw($postdata, $user['prvkey'] ?? '');
|
||||
if (!$msg) {
|
||||
if (!is_array($msg)) {
|
||||
System::xmlExit(4, 'Unable to parse message');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue