Merge pull request #11683 from MrPetovan/bug/fatal-errors
Fix a couple Fatal Errors
This commit is contained in:
commit
b9fe8ee38f
|
@ -52,7 +52,7 @@ class LocalRelationship extends BaseFactory implements ICanCreateFromTableRow
|
|||
$row['hub-verify'] ?? '',
|
||||
$row['protocol'] ?? Protocol::PHANTOM,
|
||||
$row['rating'] ?? null,
|
||||
$row['priority'] ?? null
|
||||
$row['priority'] ?? 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2047,10 +2047,10 @@ class GServer
|
|||
* Fetch the protocol of the given server
|
||||
*
|
||||
* @param int $gsid Server id
|
||||
* @return int
|
||||
* @return ?int One of Post\DeliveryData protocol constants or null if unknown or gserver is missing
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getProtocol(int $gsid): int
|
||||
public static function getProtocol(int $gsid): ?int
|
||||
{
|
||||
if (empty($gsid)) {
|
||||
return null;
|
||||
|
|
|
@ -265,11 +265,11 @@ class Delivery
|
|||
* @param boolean $public_message Is the content public?
|
||||
* @param boolean $top_level Is it a thread starter?
|
||||
* @param boolean $followup Is it an answer to a remote post?
|
||||
* @param int $server_protocol The protocol of the server
|
||||
* @param int|null $server_protocol The protocol of the server
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
private static function deliverDFRN(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup, int $server_protocol)
|
||||
private static function deliverDFRN(string $cmd, array $contact, array $owner, array $items, array $target_item, bool $public_message, bool $top_level, bool $followup, int $server_protocol = null)
|
||||
{
|
||||
// Transmit Diaspora reshares via Diaspora if the Friendica contact support Diaspora
|
||||
if (Diaspora::isReshare($target_item['body'] ?? '') && !empty(FContact::getByURL($contact['addr'], false))) {
|
||||
|
|
Loading…
Reference in a new issue