phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.97k forks source link

[BUG]: A blast from the past? Reserved words using Models #15953

Closed diplopito closed 1 year ago

diplopito commented 2 years ago

Describe the bug This bug was squashed in https://github.com/phalcon/cphalcon/issues/11922, but apparently it has made a comeback.

Steps to reproduce the behavior:

$o = new Model();
$o->source = 'something';
$o->create();

Model fails to save:

Output:

"source is required"

Expected behavior Model should be saved. Worth mentioning that data passes validation (no "source is missing" error message).

Details

niden commented 2 years ago

@diplopito It seems to be working fine on the testing suite. I also checked the code since that issue was resolved and the relevant check is still there.

Have a look at this test

https://github.com/niden/cphalcon/blob/5.0.x/tests/database/Mvc/Model/SaveCest.php#L544

(note I also tried with create() as you have it in your

diplopito commented 2 years ago

Thanks for checking this. Could you please try to test it with 4.1?

Jeckerson commented 1 year ago

v4.1 is deprecated, please use v5. In case error persist in v5, please reopen this issue.