Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

mask 8.2.5 is not compatible with PHP 7.4 #572

Closed linawolf closed 1 year ago

linawolf commented 1 year ago

Omitting the variable name in the catch block only became available with PHP 8

https://www.php.net/manual/en/language.exceptions.php

As of PHP 8.0.0, the variable name for a caught exception is optional. If not specified, the [catch](https://www.php.net/manual/en/language.exceptions.php) block will still execute but will not have access to the thrown object.

(1/1) ParseError
syntax error, unexpected ')', expecting '|' or variable (T_VARIABLE)

in /var/www/html/web/typo3conf/ext/mask/Classes/Updates/MigrateContentFields.php line 101
                        $queryBuilder
                            ->select($legacyParentColumnName)
                            ->from('tt_content')
                            ->executeQuery();
                    } catch (InvalidFieldNameException) {
                        // The legacy field does not exist, no update necessary.
                        continue;
                    }
nhovratov commented 1 year ago

Oh, thanks for the report, will fix asap.

linawolf commented 1 year ago

Why not leave it open for others to see until resolved? This just messed up my TYPO3 login while being in a hurry to do core security updates and this slipped in. Already had to issue a warning within my company. as we are updating all over

linawolf commented 1 year ago

Ok, that was quick ;)