From 5e61caa34f08b12a023925f3cdd4b33df18b407e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 6 Aug 2018 12:11:17 +0200 Subject: [PATCH] Fix for not loading the translation / some more notice removed (#5569) --- src/Core/L10n.php | 2 ++ src/Worker/Delivery.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 7470f69873..7420f98c98 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -180,6 +180,8 @@ class L10n extends BaseObject */ public static function tt($singular, $plural, $count) { + $a = self::getApp(); + $lang = Config::get('system', 'language'); if (!empty($a->strings[$singular])) { diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index a938969b59..32bcdfcc40 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -275,6 +275,12 @@ class Delivery extends BaseObject $user = DBA::selectFirst('user', [], ['uid' => $target_uid]); + // This should also never fail + if (!DBA::isResult($user)) { + logger('No user found for uid ' . $target_uid); + return; + } + $target_importer = array_merge($target_importer, $user); // Set the user id. This is important if this is a public contact -- 2.39.5