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

ArrayAccess not available in Paris #135

Open
corbinjurgens opened this issue May 16, 2020 · 1 comment
Open

ArrayAccess not available in Paris #135

corbinjurgens opened this issue May 16, 2020 · 1 comment

Comments

@corbinjurgens
Copy link

corbinjurgens commented May 16, 2020

I noticed that I am unable to access a Paris object as an array, despite it being extended from the ORM class that has array access. Is this intentional or a bug?

In the following case:

$test = Model::factory('t_user')->find_one();
print($test['name']);

I get

Fatal error: Uncaught Error: Cannot use object of type t_user as array in...

However

$test = ORM::for_table('t_user')->find_one();
print($test['name']);

Works as expected.

Thank you.

@kw-pr
Copy link

kw-pr commented Jul 28, 2021

I believe this is intentional because Paris Model::factory('t_user') returns an object not an array.

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

2 participants