fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
151 stars 95 forks source link

Run Typing on default value if value is null #444

Closed PeterTillema closed 3 years ago

PeterTillema commented 3 years ago

In favor of this: https://github.com/fuel/auth/issues/120. If a value is null when it is not allowed to, the default value is returned. However, that value is not typecasted, which means something like serialize or json are unused, while they should.

I.e. if the db column should be a serialized array, the default value can be array(), which makes sense. However, since that is not typecasted, the value becomes (), which is an SQL syntax error, rather than a:0:{}, which is the right value.

PeterTillema commented 3 years ago

Err, it seems it is already fixed :D