phalcon / cphalcon

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

[BUG]: RawValue no longer supports mysql functions #16037

Closed ALameLlama closed 1 year ago

ALameLlama commented 1 year ago

Describe the bug It looks like the change in this PR https://github.com/phalcon/cphalcon/issues/15413 has broken how it handles MySQL functions

To Reproduce This is taken from the function example Docblock. $subscriber->createdAt = new \Phalcon\Db\RawValue("now()"); Or something like: $subscriber->expiry = new \Phalcon\Db\RawValue("now() + INTERVAL 30 DAY");

PDOException #22007
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'now()' for column `database`.`table`.`created_at` at row 1
PDOException #22007
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'now() + INTERVAL 30 DAY' for column `database`.`table`.`expiry` at row 1

Details

niden commented 1 year ago

Resolved in https://github.com/phalcon/cphalcon/pull/16038