a-r-m-i-n / min

TYPO3 CMS extension "min" - Compressed CSS, JS and HTML output for TYPO3
7 stars 8 forks source link

[BUGFIX] Avoid undefined array key warnings in PHP8 #5

Closed brotkrueml closed 2 years ago

brotkrueml commented 2 years ago

PHP Warning: Undefined array key "tslib/class.tslib_fe.php" in /var/www/html/vendor/t3/min/ext_localconf.php line 18

Without TypoScript embedding: PHP Warning: Undefined array key "tx_min." in /var/www/html/vendor/t3/min/Classes/Tinysource.php line 49 PHP Warning: Undefined array key "enable" in /var/www/html/vendor/t3/min/Classes/Tinysource.php line 51

After TypoScript embedding: PHP Warning: Undefined array key "head." in /var/www/html/vendor/t3/min/Classes/Tinysource.php line 194 PHP Warning: Undefined array key "head." in /var/www/html/vendor/t3/min/Classes/Tinysource.php line 109 PHP Warning: Undefined array key "head." in /var/www/html/vendor/t3/min/Classes/Tinysource.php line 124

brotkrueml commented 2 years ago

There are some other places where the error may occur, but only when you remove one by the extension defined TypoScript setting. This can be handled in another patch.

a-r-m-i-n commented 2 years ago

Hi, thanks for your pull request and sorry that it took 3 weeks till I responded.

Unfortunately you added a merge commit, which I am not going to merge! However, I took your commit and rebased it by myself. Also, I added another commit, which fixes more undefined keys :)

Because I already added your commit to master branch, I'm going to close this PR. Thanks!

a-r-m-i-n commented 2 years ago

New version 2.0.2 is out! 🎉 https://extensions.typo3.org/extension/min