Closed kumy closed 5 years ago
I thought that we already fixed another PHP 7.4-RC issue but was not able to find one. Which F3 version are you using? I'll have a look.
The relevant section in the manual: Ternary Operator.
I'm on 3.6.5
$ composer show|grep fatfree
bcosca/fatfree-core 3.6.5 A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
According to the Example #4 Non-obvious Ternary Behaviour
from your link, the fix shoud be:
(isset($prop) ? $prop : $frac) ? strlen($frac)-2 : 0
Would you like a PR?
The bug is no longer present in the master
branch. The bug is already fixed but is not part of a stable release: https://github.com/bcosca/fatfree/issues/1142
Ho you're right, just discovered the parenthesis in master branch! BTW I naivelly have put the parenthesis the other way, but I've not tested anything.
Sorry to make you loose your time.
A fatal error is returned when loading
f3
withphp 7.4RC3
.Step to reproduce
Notes No line number is returned by php, but seems to happens there https://github.com/bcosca/fatfree-core/blob/master/base.php#L993-L995.
It don't know the legacy php <= 7.3 behavior. How should it be fixed?