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
Storing the data should be successful.
Error 'Cannot use object of type stdClass as array'
Joomla 3.9.26
Labels |
Added:
?
|
Title |
|
@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.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-06 13:15:51 |
Closed_By | ⇒ | richard67 |
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 :-(
We should back-integrate the fix for handling objects from that PR into 3.10-dev.
I'll prepare a PR soon.