aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-06 18:23:39 -0700
committerzotlabs <mike@macgirvin.com>2018-05-06 18:23:39 -0700
commita30934c563457c14606e2ec3194a3ec9713cdbba (patch)
tree88b03990ca23f555aa6f8c42c836d0b21cb1dbe3
parent5e6f6e2c3eb9b4e0501472a7206d33c90b831c01 (diff)
downloadvolse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.tar.gz
volse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.tar.bz2
volse-hubzilla-a30934c563457c14606e2ec3194a3ec9713cdbba.zip
ensure that feed xchans have a name
-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)
);