From ae8ae2e40a4ca02d14681f9b1bed2330d912325e Mon Sep 17 00:00:00 2001 From: Javad Shafique Date: Sun, 23 Oct 2022 03:18:39 +0200 Subject: [PATCH] Update Date.php Default $datetime argument ($value) to an empty string over `null` to prevent a deprecation warning. --- src/Rules/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rules/Date.php b/src/Rules/Date.php index 37c5b03..20b8f01 100644 --- a/src/Rules/Date.php +++ b/src/Rules/Date.php @@ -29,6 +29,6 @@ public function check($value): bool $this->requireParameters($this->fillableParams); $format = $this->parameter('format'); - return date_create_from_format($format, $value) !== false; + return date_create_from_format($format, $value ?? '') !== false; } }