|
13 | 13 | namespace chillerlan\DotEnv; |
14 | 14 |
|
15 | 15 | use function apache_getenv, apache_setenv, array_key_exists, array_map, explode, file, function_exists, getenv, implode, |
16 | | - in_array, ini_get, ini_set, is_array, is_file, is_numeric, is_readable, preg_replace, preg_replace_callback, putenv, |
| 16 | + in_array, is_array, is_file, is_numeric, is_readable, preg_replace, preg_replace_callback, putenv, |
17 | 17 | rtrim, strpos, strtoupper, trim; |
18 | 18 |
|
19 | 19 | use const DIRECTORY_SEPARATOR, FILE_IGNORE_NEW_LINES, FILE_SKIP_EMPTY_LINES, PHP_EOL; |
@@ -226,11 +226,7 @@ protected function read(string $file):array{ |
226 | 226 | throw new DotEnvException('invalid file: '.$file); |
227 | 227 | } |
228 | 228 |
|
229 | | - // Read file into an array of lines with auto-detected line endings |
230 | | - $autodetect = ini_get('auto_detect_line_endings'); |
231 | | - ini_set('auto_detect_line_endings', '1'); |
232 | 229 | $lines = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
233 | | - ini_set('auto_detect_line_endings', $autodetect); |
234 | 230 |
|
235 | 231 | if(!is_array($lines) || empty($lines)){ |
236 | 232 | throw new DotEnvException('error while reading file: '.$file); |
|
0 commit comments