]> git.mxchange.org Git - friendica.git/commitdiff
Fix for not loading the translation / some more notice removed (#5569)
authorMichael Vogel <icarus@dabo.de>
Mon, 6 Aug 2018 10:11:17 +0000 (12:11 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Mon, 6 Aug 2018 10:11:17 +0000 (12:11 +0200)
src/Core/L10n.php
src/Worker/Delivery.php

index 7470f698738aceda99174f8a392db7079f2699f3..7420f98c98ba9abdc0e85a48cd58f233e8ad8997 100644 (file)
@@ -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])) {
index a938969b5988d02faf507d3bb7206bb4498106b0..32bcdfcc40c137b8cea6d42fa32d11fc5d73c256 100644 (file)
@@ -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