Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check to see if the cache should be updated because of strict comparison between 0 and false #2829

Conversation

Projects
None yet
2 participants
@carakas
Copy link
Member

commented Jun 12, 2019

Type

  • Non critical bugfix

Pull request description

There was a strict comparison between 0 and false and because of that the code never worked as intended

@carakas carakas added this to the 5.6.0 milestone Jun 12, 2019

@carakas carakas requested a review from forkcms/core-contributors Jun 12, 2019

&& $this->record['navigation_title_overwrite'] === $page['navigation_title_overwrite']
&& $this->record['hidden'] === $page['hidden']
&& $this->record['navigation_title_overwrite'] == $page['navigation_title_overwrite'] // can be 0 or false
&& $this->record['hidden'] == $page['hidden'] // can be 0 or false

This comment has been minimized.

Copy link
@WouterSioen

WouterSioen Jun 12, 2019

Member

If only $this->record was an entity with an ->equals method 🙈

This comment has been minimized.

Copy link
@carakas

carakas Jun 12, 2019

Author Member

soon™

@carakas carakas merged commit 3aafee4 into forkcms:master Jun 17, 2019

3 checks passed

Scrutinizer Analysis: No new issues – Tests: passed
Details
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@carakas carakas deleted the justcarakas:fix-check-if-the-pages-cache-should-be-updated branch Jul 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.