Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/logreader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Log/LogIterator.php')
-rw-r--r--lib/Log/LogIterator.php4
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;
}