mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Changing object construction and method call to use file_put_contents.
This commit is contained in:
parent
d12c232d8a
commit
d89581dcca
1 changed files with 1 additions and 4 deletions
|
@ -67,9 +67,6 @@ class FileLog implements CakeLogInterface {
|
|||
$filename = $this->_path . $type . '.log';
|
||||
}
|
||||
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n";
|
||||
$log = new SplFileObject($filename, 'a+');
|
||||
if ($log->isWritable()) {
|
||||
return $log->fwrite($output);
|
||||
}
|
||||
return file_put_contents($filename, $output, FILE_APPEND);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue