[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX]TikiMail: String expected null given

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <689fbe8f40505_2c2ca72c71250@gitlab-sidekiq-low-urgency-cpu-bound-v2-7b465d79f4-94t4p.mail>

ushindi bienvenu pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
bda77b3e by ushindi bienvenu at 2025-08-15T23:02:44+00:00
[BP][FIX]TikiMail: String expected null given
---
* [FIX]TikiMail: String expected null given
---
* [FIX]TikiMail: String expected null given

See merge request tikiwiki/tiki!8239

See merge request tikiwiki/tiki!8309

- - - - -


1 changed file:

- lib/webmail/tikimaillib.php


Changes:

=====================================
lib/webmail/tikimaillib.php
=====================================
@@ -26,10 +26,10 @@ class TikiMail
 
     /**
      * @param string|null $user to username
-     * @param string|null $from from email
-     * @param string|null $fromName from Name
+     * @param string $from from email
+     * @param string $fromName from Name
      */
-    public function __construct($user = null, $from = null, $fromName = null)
+    public function __construct($user = null, $from = '', $fromName = '')
     {
         global $user_preferences, $prefs;
 
@@ -78,27 +78,18 @@ class TikiMail
     {
     }
 
-    public function setSender($email, $name = null)
+    public function setSender($email, $name = '')
     {
-        if (! $name) {
-            $name = null;
-        }
         $this->mail->sender(new Address($email, $name));
     }
 
-    public function setFrom($email, $name = null)
+    public function setFrom($email, $name = '')
     {
-        if (! $name) {
-            $name = null;
-        }
         $this->mail->from(new Address($email, $name));
     }
 
-    public function setReplyTo($email, $name = null)
+    public function setReplyTo($email, $name = '')
     {
-        if (! $name) {
-            $name = null;
-        }
         $this->mail->replyTo(new Address($email, $name));
     }
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bda77b3e0866ace5c95b710cdfd4f3c71e5f62a0

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bda77b3e0866ace5c95b710cdfd4f3c71e5f62a0
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.