diff options
author | Aaron Parecki <aaron@parecki.com> | 2016-01-05 17:53:14 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2016-01-05 17:53:14 -0800 |
commit | c59616a7c4e99eadafa7b856e5647df60179bb38 (patch) | |
tree | ffa9d895dbe0636f383d5d7324b1a08e8419a5d4 /lib/helpers.php | |
parent | 75d075412f0bbba867772e9a05e00480090cc290 (diff) | |
parent | 8154db31d3cbf212acb7722b9e45863292358d71 (diff) |
Merge pull request #30 from kylewm/patch-1
null-check for $url before checking for key
Diffstat (limited to 'lib/helpers.php')
-rw-r--r-- | lib/helpers.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/helpers.php b/lib/helpers.php index 8f435f0..5121d36 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -209,7 +209,7 @@ function get_syndication_targets(&$user) { // If there's a host, and the host contains a . then we can assume there's a favicon // parse_url will parse strings like http://twitter into an array with a host of twitter, which is not resolvable - if(array_key_exists('host', $url) && strpos($url['host'], '.') !== false) { + if($url && array_key_exists('host', $url) && strpos($url['host'], '.') !== false) { $targets[] = array( 'target' => $t, 'favicon' => 'http://' . $url['host'] . '/favicon.ico' @@ -313,4 +313,4 @@ function validate_photo(&$file) { return $e->getMessage(); } -}
\ No newline at end of file +} |