summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-19 15:54:16 -0700
committerBrion Vibber <brion@pobox.com>2010-03-19 15:54:54 -0700
commitdb0cf50f658a91d0d0a019256e6e85d73b7a3ff6 (patch)
treeef4d0ef1d702a45dc490f9c512ae7cdac49e9c29 /plugins
parentc84c4c6839c1791775cc698ad488bc23ed956d5b (diff)
Avoid notices for accessing undefined array indices in hcard processing
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/lib/discoveryhints.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/OStatus/lib/discoveryhints.php b/plugins/OStatus/lib/discoveryhints.php
index 9102788e6..80cfbbf15 100644
--- a/plugins/OStatus/lib/discoveryhints.php
+++ b/plugins/OStatus/lib/discoveryhints.php
@@ -102,7 +102,7 @@ class DiscoveryHints {
if (array_key_exists('url', $hcard)) {
if (is_string($hcard['url'])) {
$hints['homepage'] = $hcard['url'];
- } else if (is_array($hcard['url'])) {
+ } else if (is_array($hcard['url']) && !empty($hcard['url'])) {
// HACK get the last one; that's how our hcards look
$hints['homepage'] = $hcard['url'][count($hcard['url'])-1];
}
@@ -231,7 +231,7 @@ class DiscoveryHints {
// If it's got a scheme, use it
- if ($parts['scheme'] != '') {
+ if (!empty($parts['scheme'])) {
return $rel;
}