Skip to content

Catch a parse error in case cache file does not get written correctly #22

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

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 7, 2019

Avoids getting a message like this in the UI:

syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'

Instead we return false so the cache gets written again. Not sure if otherwise it would even leak potential data as it shows part of the broken part of the cache. Also it makes the app more stable.

Avoids getting a message like this in the UI:

`syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'`

Instead we return false so the cache gets written again. Not sure if otherwise it would even leak potential data as it shows part of the broken part of the cache. Also it makes the app more stable.
@tsteur tsteur added this to the Current sprint milestone Aug 7, 2019
@tsteur
Copy link
Member Author

tsteur commented Aug 7, 2019

Once we no longer support PHP 5 we could enable it by default and no longer detect if the class exists

@mattab
Copy link
Member

mattab commented Aug 9, 2019

LGTM

Could a test maybe added?

@tsteur
Copy link
Member Author

tsteur commented Aug 12, 2019

Added test

@mattab mattab requested a review from diosmosis January 21, 2020 05:40
@diosmosis diosmosis merged commit 5385a0e into master Jan 21, 2020
@diosmosis diosmosis deleted the catchparseerror branch January 21, 2020 10:41
@innocraft-automation innocraft-automation removed this from the Current sprint milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants