]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Fix $called_api expecting at least 2 elements in tests
[friendica.git] / include / api.php
index 6d38be95b76633a6f44052a94adf78aaf39bc987..a9a1800af17cf8772297a13f9460e83b9219163e 100644 (file)
@@ -575,6 +575,7 @@ 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]);