-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
'Indirect modification of overloaded property' exception in session bag, probably other similar places too? #1895
Comments
I have committed a fix that makes $namespace = new \Phalcon\Session\Bag('test');
+$namespace->prop1 = array();
$namespace->{'prop1'}['prop2'] = 'my value'; |
Thanks! Yes, the original code took that into account, that wasn't the issue. So, does this mean that now we can use it without setting variable first (like below) or still need to set it before doing the above?
|
Hmm, I think this can work without prior initialization, just need to return |
You can't return null by reference, in php at least. Implementing __isset should do the trick, though? That's what did it in the example above. |
This has been implemented, could you please check? |
@sjinks, added a new unit test and created a pull request. The issue remains:
|
Did you build Phalcon from build/ or from ext/? If from build/, please run php build/gen-build.php first and then rebuild. |
That did the job, works as expected. |
I guess the solution would be to add "&" in front of your __get function to pass it as reference
public function &__get ($propertyName)
.The text was updated successfully, but these errors were encountered: