Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use object of type stdClass as array #82

Open
iNDicat0r opened this issue Aug 4, 2016 · 0 comments
Open

Cannot use object of type stdClass as array #82

iNDicat0r opened this issue Aug 4, 2016 · 0 comments

Comments

@iNDicat0r
Copy link

I get the following error in my slim3 app:

Cannot use object of type stdClass as array

Message: Cannot use object of type stdClass as array
File: /var/www/slimapi/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php
Line: 83

basically mongodb return data of type stdClass and the library tries to access the data in the array fashion and therefore it throws the error.

I am using the following options for the mongoDB/Client driver options:
$driver_options['typeMap'] = ['array' => 'array', 'document' => 'array'];

Any idea what is wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant