diff options
author | Timo Schmidt <timo@xinterchange.net> | 2016-09-20 19:45:52 +0200 |
---|---|---|
committer | Timo Schmidt <timo@xinterchange.net> | 2016-09-20 19:45:52 +0200 |
commit | a26186f44342af52ee2b752930445e0b3c46ba9e (patch) | |
tree | 7633620bed21ae3c24868b0c43053d0a2fd452f0 /lib/Db | |
parent | 50aa2bb5235184f7faf66ab2efb318603b29ce4a (diff) |
Implementation for issue https://github.com/nextcloud/news/issues/38
Instead of the array return type use component parameter PHP_URL_HOST
to get the host part from the URL as string. This avoids an undefined
index warning if host part could not be found.
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/Feed.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Db/Feed.php b/lib/Db/Feed.php index 1fdcf13fb..974f2ed8c 100644 --- a/lib/Db/Feed.php +++ b/lib/Db/Feed.php @@ -137,7 +137,7 @@ class Feed extends Entity implements IAPI, \JsonSerializable { 'basicAuthPassword' ]); - $url = parse_url($this->link)['host']; + $url = parse_url($this->link, PHP_URL_HOST); // strip leading www. to avoid css class confusion if (strpos($url, 'www.') === 0) { |