diff options
author | Robin Appelman <robin@icewind.nl> | 2017-05-15 17:10:43 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-05-19 04:32:56 +0300 |
commit | f9b592e38207a1f5e20b151b46084ed9934a39ec (patch) | |
tree | 25db92191e8cdc8b897f0bec94168d8686ac71b4 | |
parent | d30e42d11b1f30ce9451f323f1a0eb57726f7e58 (diff) |
dont die when we cant decipher the logging timev12.0.0RC3v12.0.0RC2v12.0.0
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/Log/LogIterator.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Log/LogIterator.php b/lib/Log/LogIterator.php index a4ac4d5..224fd05 100644 --- a/lib/Log/LogIterator.php +++ b/lib/Log/LogIterator.php @@ -72,7 +72,9 @@ class LogIterator implements \Iterator { $entry = json_decode($this->lastLine, true); if ($this->dateFormat !== \DateTime::ATOM) { $time = \DateTime::createFromFormat($this->dateFormat, $entry['time']); - $entry['time'] = $time->format(\DateTime::ATOM); + if ($time) { + $entry['time'] = $time->format(\DateTime::ATOM); + } } return $entry; } |