check if user_info is an array before counting

This commit is contained in:
Philipp Holzer 2019-03-02 11:55:51 +01:00
parent b06fc57880
commit 6986e6902b
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5

View File

@ -953,7 +953,7 @@ function api_account_verify_credentials($type)
// - Adding last status
if (!$skip_status) {
$user_info["status"] = api_status_show("raw");
if (!count($user_info["status"])) {
if (!is_array($user_info["status"]) || !count($user_info["status"])) {
unset($user_info["status"]);
} else {
unset($user_info["status"]["user"]);