Skip to content

fix(middleware): guard ConvertCsvMiddleware against absent params - #17

Merged
alexstandiford merged 1 commit into
mainfrom
fix/csv-middleware-null-guard
Jun 12, 2026
Merged

alexstandiford merged 1 commit into
mainfrom
fix/csv-middleware-null-guard

Conversation

@alexstandiford

Copy link
Copy Markdown
Contributor

explode(null) deprecation fired on every request without the optional CSV param. Behavior-preserving: absent/empty input still converts to an empty list. Verified via standalone exercise (repo test bootstrap is broken pre-existing — ValidateCITest references a nonexistent PHPNomad\Core\Tests\TestCase) and end-to-end by Siren's fresh-install smoke walk.

explode(null) is deprecated on PHP 8.1+ and logged on every request
where the optional CSV param is absent (surfaced by WordPress REST
permission-callback derivation running the middleware under WP_DEBUG).
Absent or empty params convert to an empty list — the same result the
explode()+filter pipeline always produced.

Bumps version to 2.1.2.
@alexstandiford
alexstandiford merged commit 4912169 into main Jun 12, 2026
0 of 6 checks passed
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.

1 participant