From b9da831138667700d465f15ad50df650ab4da427 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jul 2016 09:27:40 +0200 Subject: [PATCH] Fallback for empty names --- include/Probe.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/Probe.php b/include/Probe.php index c31b98a9aa..df2246f206 100644 --- a/include/Probe.php +++ b/include/Probe.php @@ -232,10 +232,15 @@ class Probe { else $data["photo"] = App::get_baseurl().'/images/person-175.jpg'; - if (!isset($data["name"])) - $data["name"] = $data["url"]; + if (!isset($data["name"]) OR ($data["name"] == "")) { + if (isset($data["nick"])) + $data["name"] = $data["nick"]; - if (!isset($data["nick"])) { + if ($data["name"] == "") + $data["name"] = $data["url"]; + } + + if (!isset($data["nick"]) OR ($data["nick"] == "")) { $data["nick"] = strtolower($data["name"]); if (strpos($data['nick'], ' ')) -- 2.39.5