-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[3.9] _jsonEncode in table not working with object #33553
Comments
In J4 it was fixed with #25761 . Unfortunately that PR doesn't tell anything about it in its title or description, it just mentions tests being added :-( |
The pull request with a fix for this issue for 3.10 is almost ready. It only needs testing instructions, but that would need to write some little PHP class and test program. @Flowman Do you have some extension which we could use for testing? |
PR is #33558 . |
@richard67 not really. I got this quiz or lms component I am building but its to large. But I know the changes you are doing is working, as I did the same hack to the core on my test site. |
Closing as having a pull request. Please test #33558 . Thanks in advance. |
New pull request is #33633 for 3.9. Please test. Thanks in advance. |
Steps to reproduce the issue
When storing a object to the table and _jsonEncode is set on the table, it will fail with 'Cannot use object of type stdClass as array'.
It is because only supports arrays but the rest of the bind function supports both arrays and objects.
joomla-cms/libraries/src/Table/Table.php
Line 602 in 2b7a904
This has been fixed in 4.0
Expected result
Storing the data should be successful.
Actual result
Error 'Cannot use object of type stdClass as array'
System information (as much as possible)
Joomla 3.9.26
The text was updated successfully, but these errors were encountered: