Bugfix Versandarten foreach null when module is not loaded#259
Open
Avatarsia wants to merge 1 commit intoOpenXE-org:masterfrom
Open
Bugfix Versandarten foreach null when module is not loaded#259Avatarsia wants to merge 1 commit intoOpenXE-org:masterfrom
Avatarsia wants to merge 1 commit intoOpenXE-org:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #258
Problem
Beim Anlegen einer Versandart ohne Modul crasht die Edit-Seite mit
TypeError: foreach() argument must be of type array|object, null givenunter PHP 8.Ursache
Commit 8d84eb8 hat
$obj->getErrors()durch den Nullsafe-Operator$obj?->getErrors()ersetzt. Wenn$objnull ist, liefert der Ausdruck abernull, nicht[]— das anschließendeforeachcrasht dann unter PHP 8.Fix
Ergänzt
?? []an beiden betroffenen Stellen inwww/pages/versandarten.php, damitforeachimmer ein Array erhält.Test