Skip to content

[BUGFIX] Guard prefix/suffix options in number generation - #767

Merged
extcode merged 1 commit into
extcode:mainfrom
SAY-5:fix-number-prefix-suffix-undefined-key
Oct 11, 2026
Merged

extcode merged 1 commit into
extcode:mainfrom
SAY-5:fix-number-prefix-suffix-undefined-key

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Generating an order, invoice, or delivery number without a configured prefix or suffix in TypoScript logs PHP Warning: Undefined array key "suffix" (and prefix) from Number::generateNumber(), because the two keys are read directly while format and offset in the same method already use ??.

This adds the same null-coalescing guard so the number is generated without the affix when it is not configured. No behavior change when the keys are present.

Fixes #766

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>

@extcode extcode left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Thank you for fixing this bug. I'll refactor this by replacing all using the TYPO3 ArrayUtility.

@extcode
extcode merged commit 9587049 into extcode:main Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP warning Undefined array key "suffix" in Number.php

2 participants