Commit cbf2e7cf authored by Brion Vibber's avatar Brion Vibber

Avoid PHP notice about undefined array index when no avatar photo available from Google profile

parent 2c12d837
......@@ -84,7 +84,7 @@ class DiscoveryHints {
$hints['fullname'] = implode(' ', $hcard['n']);
}
if (array_key_exists('photo', $hcard)) {
if (array_key_exists('photo', $hcard) && count($hcard['photo'])) {
$hints['avatar'] = $hcard['photo'][0];
}
......
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