Take void return into account

This commit is contained in:
Philipp Holzer 2019-03-02 14:23:46 +01:00
parent 6986e6902b
commit 04b7280f38
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5

View file

@ -953,12 +953,14 @@ function api_account_verify_credentials($type)
// - Adding last status // - Adding last status
if (!$skip_status) { if (!$skip_status) {
$user_info["status"] = api_status_show("raw"); $user_info["status"] = api_status_show("raw");
if (isset($user_info["status"])) {
if (!is_array($user_info["status"]) || !count($user_info["status"])) { if (!is_array($user_info["status"]) || !count($user_info["status"])) {
unset($user_info["status"]); unset($user_info["status"]);
} else { } else {
unset($user_info["status"]["user"]); unset($user_info["status"]["user"]);
} }
} }
}
// "uid" and "self" are only needed for some internal stuff, so remove it from here // "uid" and "self" are only needed for some internal stuff, so remove it from here
unset($user_info["uid"]); unset($user_info["uid"]);