flux
flux copied to clipboard
php 7.1 syntax error in \flux\Classes\Utility\ExtensionConfigurationUtility.php
Only with php 7.1, in \flux\Classes\Utility\ExtensionConfigurationUtility.php
the syntax:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['flux']['hooks'] ??= [];
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['flux']['hooks'] ??= [];
generate syntax error.
We can solve replacing with:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['flux']['hooks'] ?? [];
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['flux']['hooks'] ?? [];
(by removing the equal symbol at the end)
ext_emconf.php says you need PHP 7.4+ composer.json says you need PHP 7.4+.
This bug is invalid.
@NamelessCoder please close
I was getting this error and I am using TYPO3 10.4.27 with PHP 7.4.28. I have manually edited the file on my site to remove the equals sign.
The modification shown by @supercaccia does not solve the problem. The null coalescing assignment operator was introduced with php 7.4: https://www.php.net/manual/en/migration74.new-features.php#migration74.new-features.core.null-coalescing-assignment-operator
So using PHP 7.4 is enough, and the code does not need to be fixed.
I've attached screen captures of the error and the PHP for the site where I receive the error..
Error Screen on the frontend...
.
PHP Environment in the TYPO3 backend...
So, could it be that I'm running fpm version of PHP?
This is my local dev server, the code runs fine on the production server. Strange. I agree that this is correct as written. I'm having a different issue. Thanks for all your work on this extension!
Flux now avoids the null coalesce assign operator - both the original issue and the addition issue from @electricretina should both be solved now.