]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Mail.php
Move L10n::t() calls to DI::l10n()->t() calls
[friendica.git] / src / Model / Mail.php
index da72d7d51f39d8c07916a6b3cb47adae5cd6d305..77bf39878a6d4e0f43c8e74df9e707f2f8294ab4 100644 (file)
@@ -112,7 +112,7 @@ class Mail
                }
 
                if (!strlen($subject)) {
-                       $subject = L10n::t('[no subject]');
+                       $subject = DI::l10n()->t('[no subject]');
                }
 
                $me = DBA::selectFirst('contact', [], ['uid' => local_user(), 'self' => true]);
@@ -216,7 +216,7 @@ class Mail
                        if (count($images)) {
                                foreach ($images as $image) {
                                        $image_rid = Photo::ridFromURI($image);
-                                       if ($image_rid) {
+                                       if (!empty($image_rid)) {
                                                Photo::update(['allow-cid' => '<' . $recipient . '>'], ['resource-id' => $image_rid, 'album' => 'Wall Photos', 'uid' => local_user()]);
                                        }
                                }
@@ -247,7 +247,7 @@ class Mail
                }
 
                if (!strlen($subject)) {
-                       $subject = L10n::t('[no subject]');
+                       $subject = DI::l10n()->t('[no subject]');
                }
 
                $guid = System::createUUID();