]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
If no record is found, below $r[0] will fail with a E_NOTICE and the code
[friendica.git] / src / Model / GContact.php
index eb93c55ce6498a88e4b1219f9be0eada23540ea5..efb4b6a401e7955b6894fe0a66566ea5f7ee7851 100644 (file)
@@ -955,6 +955,11 @@ class GContact
                        intval($uid)
                );
 
+               if (!DBM::is_result($r)) {
+                       logger('Cannot find user with uid=' . $uid, LOGGER_NORMAL);
+                       return false;
+               }
+
                $location = Profile::formatLocation(
                        ["locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"]]
                );