Bug #78535 [Opn->Csd]: auto_detect_line_endings value not parsed as bool

From: Date: Sat, 14 Sep 2019 16:49:35 +0000
Subject: Bug #78535 [Opn->Csd]: auto_detect_line_endings value not parsed as bool
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222742@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78535&edit=1 ID: 78535 Updated by: cmb@php.net Reported by: bugreportuser+php dot bugs at gmail dot com Summary: auto_detect_line_endings value not parsed as bool -Status: Open +Status: Closed Type: Bug Package: *Configuration Issues Operating System: any PHP Version: 7.2.22 Block user comment: N Private report: N New Comment: Automatic comment on behalf of 37939393+bugreportuser@users.noreply.github.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=fdcca930561babde7fe46cb51215ca9422dea09f Log: Fix #78535: auto_detect_line_endings value not parsed as bool Previous Comments: ------------------------------------------------------------------------ [2019-09-13 21:43:51] bugreportuser+php dot bugs at gmail dot com The following pull request has been associated: Patch Name: Fix auto_detect_line_endings type On GitHub: https://github.com/php/php-src/pull/4700 Patch: https://github.com/php/php-src/pull/4700.patch ------------------------------------------------------------------------ [2019-09-13 21:42:51] bugreportuser+php dot bugs at gmail dot com Description: ------------ Setting "auto_detect_line_endings" to "on" with "ini_set" doesn't enable it, because the value's parsed as a long. This bug has a pull request. Test script: --------------- <?php ini_set("auto_detect_line_endings", "on"); var_dump(ini_get("auto_detect_line_endings")); $filePath = __DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt"; file_put_contents($filePath, "fooBar1\rfooBar2\rfooBar3"); $stdin = fopen($filePath, "r"); var_dump(fgets($stdin)); Expected result: ---------------- string(2) "on" string(8) "fooBar1" Actual result: -------------- string(2) "on" string(23) "fooBar1fooBar2fooBar3" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78535&edit=1

« previous php.bugs (#222742) next »