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

strict_types not working with no temp directory #191

Closed
MartkCz opened this issue Jun 29, 2019 · 0 comments
Closed

strict_types not working with no temp directory #191

MartkCz opened this issue Jun 29, 2019 · 0 comments

Comments

@MartkCz
Copy link
Contributor

@MartkCz MartkCz commented Jun 29, 2019

Version: 2.5.1

$engine = new Engine();
$engine->setStrictTypes();

$engine->renderToString($file);

Result: nothing, because @eval('?>' . $code) mutes Fatal error and php dies without any message.

When @ is manually deleted, php throws error:
PHP Fatal error: strict_types declaration must be the very first statement in the script in /home/martin/Plocha/tools/vendor/latte/latte/src/Latte/Engine.php(161) : eval()'d code on line 2

When setStrictTypes(false); everything is ok

When setTempDirectory(...) with setStrictTypes(true) everything is ok

dg added a commit that referenced this issue Jul 1, 2019
@dg dg closed this in 58ea2f7 Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.