Skip to content

Fix GH-16993: Fix filter_var_array to warn when validation filters are incorrectly combined with FILTER_NULL_ON_FAILURE flag - #19660

Merged
alexandre-daubois merged 1 commit into
php:masterfrom
alexandre-daubois:filter-warning-inv-usage
Sep 8, 2025
Merged

Fix GH-16993: Fix filter_var_array to warn when validation filters are incorrectly combined with FILTER_NULL_ON_FAILURE flag#19660
alexandre-daubois merged 1 commit into
php:masterfrom
alexandre-daubois:filter-warning-inv-usage

Conversation

@alexandre-daubois

Copy link
Copy Markdown
Member

Fix #16993

@alexandre-daubois
alexandre-daubois changed the base branch from master to PHP-8.3 September 1, 2025 14:14
@alexandre-daubois
alexandre-daubois marked this pull request as ready for review September 1, 2025 14:31
Comment thread ext/filter/filter.c Outdated
Comment thread ext/filter/tests/gh16993.phpt Outdated
@alexandre-daubois
alexandre-daubois force-pushed the filter-warning-inv-usage branch 2 times, most recently from d2c7be7 to 241c25b Compare September 3, 2025 08:12

@iluuu1994 iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Though I think new warnings should go to master. In that case, you'll need to ping release managers.

@alexandre-daubois

Copy link
Copy Markdown
Member Author

Works for me, it would make more sense I think. WDYT @php/release-managers-85?

@DanielEScherzer DanielEScherzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RM approval for 8.5, no technical review performed

@alexandre-daubois
alexandre-daubois changed the base branch from PHP-8.3 to master September 8, 2025 07:42
@alexandre-daubois

Copy link
Copy Markdown
Member Author

I rebased on master. Friendly ping @iluuu1994, can you double-check with the rebase just to be sure, please?

@iluuu1994 iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must've missed the test description in the last review.

Rebase looks good. If you squash & merge via GitHub UI nothing can go wrong in that regard anyway. 🙂 If you merge locally, git merge --ff-only can provide some confidence as well.

Comment thread ext/filter/tests/gh16993.phpt Outdated
… are incorrectly combined with FILTER_NULL_ON_FAILURE flag
@alexandre-daubois
alexandre-daubois merged commit 5ae8125 into php:master Sep 8, 2025
9 checks passed
@alexandre-daubois
alexandre-daubois deleted the filter-warning-inv-usage branch September 8, 2025 12:50
adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request Aug 4, 2026
… are incorrectly combined with FILTER_NULL_ON_FAILURE flag (php#19660)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ext/filter: filter_var_array with FILTER_VALIDATE_INT|FILTER_NULL_ON_FAILURE for an entry flag does not validate.

3 participants