diff --git a/lib/Log/LogIterator.php b/lib/Log/LogIterator.php index 6422af2ed..54218a39f 100644 --- a/lib/Log/LogIterator.php +++ b/lib/Log/LogIterator.php @@ -75,9 +75,11 @@ function rewind() { function current() { $entry = json_decode($this->lastLine, true); if ($this->dateFormat !== \DateTime::ATOM) { - $time = \DateTime::createFromFormat($this->dateFormat, $entry['time'], $this->timezone); - if ($time) { - $entry['time'] = $time->format(\DateTime::ATOM); + if (isset($entry['time'])) { + $time = \DateTime::createFromFormat($this->dateFormat, $entry['time'], $this->timezone); + if ($time) { + $entry['time'] = $time->format(\DateTime::ATOM); + } } } return $entry;