diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index ebc3361c88b..c66aa59cc0c 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -148,7 +148,7 @@ class LogEventsList extends ContextSource { $formDescriptor['date'] = [ 'type' => 'date', 'label-message' => 'date', - 'default' => sprintf( "%04d-%02d-%02d", $year, $month, $day ), + 'default' => $year && $month && $day ? sprintf( "%04d-%02d-%02d", $year, $month, $day ) : '', ]; // Tag filter