Entity misbehavior after upgrading from 4.1.9 to 4.2.1 |
Just noticed my application started behaving oddly after upgrading to 4.2.1. Entity attributes that I know have a value are reporting as not having a value. For example, I have an entity like this:
PHP Code: <?php I know it's not necessary to have a datamap setup for an attribute of the same name but I have my reasons. Now in my code if I set a value for test_attr, I can get the value of the attribute, but if I check the value of the attribute with empty() or isset(), they return true/false respectively. For example: PHP Code: $t = new \App\Entities\TestEntity(); ![]() It looks like as of 4.2.0, CodeIgniter\Entity\Entity::__isset was altered to include: PHP Code: if ($this->isMappedDbColumn($key)) {
The change is for fixing this.
https://forum.codeigniter.com/thread-80835.html
(07-13-2022, 07:18 PM)kenjis Wrote: The change is for fixing this. Awesome, thank you! |
Welcome Guest, Not a member yet? Register Sign In |