git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5849 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-22 04:44:39 +00:00
parent 0873217a1f
commit 7bc3e307b7

View file

@ -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;
}