Skip to content

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

Open
SAY-5 wants to merge 1 commit into
extcode:mainfrom
SAY-5:fix-number-prefix-suffix-undefined-key
Open

SAY-5 wants to merge 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

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>

This branch has not been deployed

No deployments
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

1 participant