We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit db0cf50f authored by Brion Vibber's avatar Brion Vibber

Avoid notices for accessing undefined array indices in hcard processing

parent c84c4c68
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment