Merge pull request #6789 from nupplaphil/issue/6337-warnings
Check if user_info is an array before counting
This commit is contained in:
commit
b01efc3ada
|
@ -953,12 +953,14 @@ 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 (isset($user_info["status"])) {
|
||||
if (!is_array($user_info["status"]) || !count($user_info["status"])) {
|
||||
unset($user_info["status"]);
|
||||
} else {
|
||||
unset($user_info["status"]["user"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// "uid" and "self" are only needed for some internal stuff, so remove it from here
|
||||
unset($user_info["uid"]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user