mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixes #3420
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5849 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0873217a1f
commit
7bc3e307b7
1 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,8 @@ class File extends Object {
|
|||
if (substr(PHP_OS,0,3) == "WIN") {
|
||||
$lineBreak = "\r\n";
|
||||
}
|
||||
$data = r(array("\r\n", "\n", "\r"), $lineBreak, $data);
|
||||
$data = strtr($data, array("\r\n" => $lineBreak, "\n" => $lineBreak, "\r" => $lineBreak));
|
||||
|
||||
if (fwrite($this->handle, $data) !== false) {
|
||||
$success = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue