aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index 26ed24de2..b0bda1f9d 100644
--- a/include/network.php
+++ b/include/network.php
@@ -999,7 +999,7 @@ function discover_by_url($url, $arr = null) {
return false;
$network = (($arr['network']) ? $arr['network'] : 'unknown');
- $name = (($arr['name']) ? $arr['name'] : 'unknown');
+ $name = (trim($arr['name']) ? trim($arr['name']) : 'unknown');
$photo = (($arr['photo']) ? $arr['photo'] : '');
$addr = (($arr['addr']) ? $arr['addr'] : '');
$guid = $url;
@@ -1103,6 +1103,9 @@ function discover_by_url($url, $arr = null) {
if(! $name)
$name = notags($feed->get_description());
+ if(! $name)
+ $name = 'unknown';
+
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($guid)
);