diff --git a/lib/PicoFeed/Parser/DateParser.php b/lib/PicoFeed/Parser/DateParser.php index b753a37..f3233fd 100644 --- a/lib/PicoFeed/Parser/DateParser.php +++ b/lib/PicoFeed/Parser/DateParser.php @@ -98,7 +98,7 @@ public function getValidDate($format, $value) if ($date !== false) { $errors = DateTime::getLastErrors(); - if ($errors['error_count'] === 0 && $errors['warning_count'] === 0) { + if (!$errors || ($errors['error_count'] === 0 && $errors['warning_count'] === 0)) { return $date; } }