Skip to content

[1.x] Fix parsing file_uploads and enable_post_data_reading ini settings to match PHP - #557

Open
clue wants to merge 1 commit into
reactphp:1.xfrom
clue-labs:ini-booleans-v1
Open

clue wants to merge 1 commit into
reactphp:1.xfrom
clue-labs:ini-booleans-v1

Conversation

@clue

@clue clue commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

This changeset fixes parsing the file_uploads and enable_post_data_reading ini settings to match how PHP parses boolean ini values. The usual On and Off values already worked as expected, but less common values such as 0 were ignored, so file uploads and request body parsing stayed enabled:

file_uploads = On      ; enabled before and after
file_uploads = Off     ; disabled before and after
file_uploads = 0       ; enabled before, now disabled like in PHP
file_uploads = "off"   ; enabled before, now disabled like in PHP

This also answers @WyriHaximus' original question about 0 from back when #271 added these checks.

Builds on top of #274, #271 and #276
Thanks @jf0x3f for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant