[BUGFIX] PHP 8.1 deprecation exceptions #449
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix PHP 8.1 related exceptions:
1. When preparing the newsletter on "Step 5":
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Runtime Deprecation Notice: Function strftime() is deprecated in /app/html/typo3conf/ext/direct_mail/Classes/Module/DmailController.php line 1428
See: https://php.watch/versions/8.1/strftime-gmstrftime-deprecated
For now, we just supress the warning, this has to be rewritten when you want to be compatible with PHP 9.x later on.
2. When running the queue processor:
Die Ausführung von Task "Direct Mail: Mailing Queue (direct_mail)" ist fehlgeschlagen mit folgender Meldung: PHP Runtime Deprecation Notice: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /app/html/typo3conf/ext/direct_mail/Classes/Dmailer.php line 357
3. When editing a category in the backend:
PHP 8.1 warning:
Bei dem Versuch, die Elemente für Feld "Must subscribe to one of the categories:" (PHP Warning: Undefined array key "transOrigPointerTable" in /app/html/typo3conf/ext/direct_mail/Classes/Repository/TempRepository.php line 318) zu verarbeiten, ist ein Fehler aufgetreten.
The TCA configuration option transOrigPointerTable does not exist since TYPO3 v8 anymore. See: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/8.5/Breaking-78191-RemoveSupportForTransForeignTableInTCA.html