Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-11-04 17:04:20 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-11-04 17:04:20 +0300
commit28747c5c83f38e58dca0c532626ded81d97e32fe (patch)
tree7417d3f51d51dfa00c290e502a9cdb9b9f23608d /lib/Address.php
parent9f0b1554ae5150212a6f850ec72a1831f9f8e8d6 (diff)
Handle null email address before iconv conversion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Address.php')
-rw-r--r--lib/Address.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Address.php b/lib/Address.php
index 98f9f11cd..a8ea774cd 100644
--- a/lib/Address.php
+++ b/lib/Address.php
@@ -74,8 +74,12 @@ class Address implements JsonSerializable {
* @return string|null
*/
public function getEmail(): ?string {
+ $email = $this->wrapped->bare_address;
+ if ($email === null) {
+ return null;
+ }
// Lets make sure the e-mail is valid UTF-8 at all times
- return iconv("UTF-8","UTF-8//IGNORE", $this->wrapped->bare_address);
+ return iconv("UTF-8","UTF-8//IGNORE", $email);
}
/**