|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78535 auto_detect_line_endings value not parsed as bool
Submitted: 2019-09-13 21:42 UTC Modified: 2019-09-14 16:50 UTC
From: bugreportuser+php dot bugs at gmail dot com Assigned: cmb (profile)
Status: Closed Package: *Configuration Issues
PHP Version: 7.2.22 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
47 + 49 = ?
Subscribe to this entry?

 [2019-09-13 21:42 UTC] bugreportuser+php dot bugs at gmail dot com
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:

ini_set("auto_detect_line_endings", "on");

$filePath = __DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt";
file_put_contents($filePath, "fooBar1\rfooBar2\rfooBar3");

$stdin = fopen($filePath, "r");

Expected result:
string(2) "on"
string(8) "fooBar1"

Actual result:
string(2) "on"
string(23) "fooBar1fooBar2fooBar3"


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-13 21:43 UTC] 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:
 [2019-09-14 16:49 UTC]
Automatic comment on behalf of
Log: Fix #78535: auto_detect_line_endings value not parsed as bool
 [2019-09-14 16:49 UTC]
-Status: Open +Status: Closed
 [2019-09-14 16:50 UTC]
-Assigned To: +Assigned To: cmb
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 07:01:30 2024 UTC