cannot use object of type stdclass as array
$obj_user = json_decode($user, true);
use json_decode($obj, true); // add true
cannot use object of type stdclass as array
$obj_user = json_decode($user, true);
use json_decode($obj, true); // add true
Cannot use object of type stdClass as array in isset
function deliciousCount($domain_name) {
$data = json_decode(
file_get_contents(
"http://feeds.delicious.com/v2/json/urlinfo/data?url=$domain_name"
)
);
// You should double check everything because this delicious function is broken
if (is_array($data) && isset($data[ 0 ]) &&
$data[ 0 ] instanceof stdClass && isset($data[ 0 ]->total_posts)) {
return $data[ 0 ]->total_posts;
} else {
return 0;
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us