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

EVAL in PHP 7 ParseError #2086

Open
enpepet opened this issue Feb 21, 2019 · 0 comments
Open

EVAL in PHP 7 ParseError #2086

enpepet opened this issue Feb 21, 2019 · 0 comments

Comments

@enpepet
Copy link

enpepet commented Feb 21, 2019

We are migrating a fabrik App to Fabrik 3.9 and PHP 7.
In previous versions of PHP/Fabrik the "Parse Error" does not stop the code and fabrik continues working logging the error unless debug is active.

NOW stops working If the syntax of PHP in the calc fields or events or dropdowns is not correct.

In PHP 7 maybe is needed to add a try / Catch in all "eval" calls and only trown an screen error on debug mode.

It is:

try {
$res = eval($PHPcode);
}catch(ParseError $e){
// LOG ERROR OR DIE
}

Also maybe is better to centralize all calls to eval in a helper or class.

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

No branches or pull requests

1 participant