Merge pull request #443 from virtualtam/fix/logm-eol

fix: use PHP_EOL for carriage returns in file logs
This commit is contained in:
VirtualTam 2016-01-18 00:28:21 +01:00
commit dc7db03feb
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ function logm($logFile, $clientIp, $message)
{
file_put_contents(
$logFile,
date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).'\n',
date('Y/m/d H:i:s').' - '.$clientIp.' - '.strval($message).PHP_EOL,
FILE_APPEND
);
}

View file

@ -51,7 +51,7 @@ protected function setUp()
protected function getLastLogEntry()
{
$logFile = file(self::$testLogFile);
return explode(' - ', trim(array_pop($logFile), '\n'));
return explode(' - ', trim(array_pop($logFile), PHP_EOL));
}
/**