]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Warnings fixed
[friendica.git] / include / api.php
index ad991485a4da241e0c536d0746f2e85f98c8fd0c..42868aa9eb81566c5f2587dafcdca9f3b2db4158 100644 (file)
@@ -579,7 +579,9 @@ function api_get_user(App $a, $contact_id = null)
        // $called_api is the API path exploded on / and is expected to have at least 2 elements
        if (is_null($user) && ($a->argc > (count($called_api) - 1)) && (count($called_api) > 0)) {
                $argid = count($called_api);
-               list($user, $null) = explode(".", $a->argv[$argid]);
+               if (!empty($a->argv[$argid])) {
+                       list($user, $null) = explode(".", $a->argv[$argid]);
+               }
                if (is_numeric($user)) {
                        $user = dbesc(api_unique_id_to_nurl(intval($user)));