Merge pull request #11769 from MrPetovan/bug/fatal-errors
Fix wrong type-hint in Module/DFRN/Notify
This commit is contained in:
commit
389e59b857
|
@ -59,13 +59,13 @@ class Notify extends BaseModule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dispatchPublic(array $postdata)
|
private static function dispatchPublic(string $postdata): bool
|
||||||
{
|
{
|
||||||
$msg = Diaspora::decodeRaw($postdata, '', true);
|
$msg = Diaspora::decodeRaw($postdata, '', true);
|
||||||
if (!is_array($msg)) {
|
if (!is_array($msg)) {
|
||||||
// We have to fail silently to be able to hand it over to the salmon parser
|
// We have to fail silently to be able to hand it over to the salmon parser
|
||||||
Logger::warning('Diaspora::decodeRaw() has failed for some reason.');
|
Logger::warning('Diaspora::decodeRaw() has failed for some reason.');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch the corresponding public contact
|
// Fetch the corresponding public contact
|
||||||
|
@ -87,6 +87,8 @@ class Notify extends BaseModule
|
||||||
// Now we should be able to import it
|
// Now we should be able to import it
|
||||||
$ret = DFRN::import($msg['message'], $importer, Conversation::PARCEL_DIASPORA_DFRN, Conversation::RELAY);
|
$ret = DFRN::import($msg['message'], $importer, Conversation::PARCEL_DIASPORA_DFRN, Conversation::RELAY);
|
||||||
System::xmlExit($ret, 'Done');
|
System::xmlExit($ret, 'Done');
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function dispatchPrivate(array $user, string $postdata)
|
private static function dispatchPrivate(array $user, string $postdata)
|
||||||
|
|
Loading…
Reference in a new issue