Skip to content

Conversation

@katiecrane
Copy link

This function is called from getDirty() to determine if a field on a model has been updated. When comparing dates, the types still need to be checked. You may be trying to replace the string “1994-04-01 00:00:00” with a date value of 1994-04-01 00:00:00, and for these two values, comparison with == is true while === is false. If we use ==, the value in the database will remain a string instead of updating to a date as we are trying to do.

@halaei
Copy link
Contributor

halaei commented Nov 30, 2018

Hi. In case you are still interested, please check #1664 which uses fromPHP() function for getDirty().

@divine
Copy link
Contributor

divine commented Jan 22, 2020

Should be closed in favor of PR #1664

cc @Smolevich

@Smolevich Smolevich closed this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants