I'm running the following code:
try {
$count = $user[0]->followers_count;
} catch (Exception $e) {
return 'error';
}
dd('continuing execution');
Which outputs this:
FatalErrorException in Twitter.php line 174: Cannot use object of type stdClass as array
Now, a quote from https://stackoverflow.com/a/13955721/2724978
First of all one should make clear that an exception is only fatal if it is not caught. Catching an exception does not halt script execution.
My code is not continuing the execution even though it's on a try/catch block. I'm pretty sure I'm missing something, what is it?
$useris an object and not an array so try$count = $user->followers_count;Twitter.php