Respect auto_detect_line_endings ini setting
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
The logic of File::readLine(), which is used to implement fgets() in userland, implements the Mac lining detection logic of 'auto_detect_line_endings'. Note that 'auto_detect_line_endings' defaults to being off in stock PHP and causes bugs with fgets() when packets are split in "unlucky" ways. See http://www.php.net//manual/en/function.fgets.php#101963.
This has resulted in at least one bug in the Redis extension (https://github.com/facebook/hhvm/pull/2874). I don't know what else might be broken.
The whole existence of the ini setting in PHP was probably a design mistake, so it's tempting to recommend just deleting the code...though for feature parity I guess the best option is to support the PHP ini behavior.
Contributor guide
Assessment
This issue has not been assessed yet.