From dbbb1c1c8a1fa0a51677b5a74fcfe0e2561ced91 Mon Sep 17 00:00:00 2001 From: Kane Cohen Date: Thu, 21 Jan 2021 10:48:50 +0000 Subject: [PATCH] Update whereDay and whereYear to clean value. --- src/Illuminate/Database/Query/Builder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php index c8d47e621495..85679e9472c0 100755 --- a/src/Illuminate/Database/Query/Builder.php +++ b/src/Illuminate/Database/Query/Builder.php @@ -1204,7 +1204,7 @@ public function whereDay($column, $operator, $value = null, $boolean = 'and') $value, $operator, func_num_args() === 2 ); - $value = is_array($value) ? head($value) : $value; + $value = $this->scalarValue($value); if ($value instanceof DateTimeInterface) { $value = $value->format('d'); @@ -1294,7 +1294,7 @@ public function whereYear($column, $operator, $value = null, $boolean = 'and') $value, $operator, func_num_args() === 2 ); - $value = is_array($value) ? head($value) : $value; + $value = $this->scalarValue($value); if ($value instanceof DateTimeInterface) { $value = $value->format('Y');