diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index c11c5b3..2d8a385 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -698,7 +698,7 @@ protected function formatLogEntries(array $logEntries): string foreach ($logEntries as $logEntry) { // Timestamp is in milliseconds, but date() requires seconds. - $time = date('H:i:s', $logEntry['timestamp'] / 1000) . + $time = date('H:i:s', intval($logEntry['timestamp'] / 1000)) . // Append the milliseconds to the end of the time string '.' . ($logEntry['timestamp'] % 1000); $formattedLogs .= "{$time} {$logEntry['level']} - {$logEntry['message']}\n"; @@ -718,7 +718,7 @@ protected function logJSErrors(ScenarioDriven $test, array $browserLogEntries): && $this->isJSError($logEntry['level'], $logEntry['message']) ) { // Timestamp is in milliseconds, but date() requires seconds. - $time = date('H:i:s', $logEntry['timestamp'] / 1000) . + $time = date('H:i:s', intval($logEntry['timestamp'] / 1000)) . // Append the milliseconds to the end of the time string '.' . ($logEntry['timestamp'] % 1000); $test->getScenario()->comment("{$time} {$logEntry['level']} - {$logEntry['message']}");