Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7797c2a

Browse files
committed
Update whereDay and whereYear to clean value.
1 parent c2d71ad commit 7797c2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ public function whereDay($column, $operator, $value = null, $boolean = 'and')
12041204
$value, $operator, func_num_args() === 2
12051205
);
12061206

1207-
$value = is_array($value) ? head($value) : $value;
1207+
$value = $this->scalarValue($value);
12081208

12091209
if ($value instanceof DateTimeInterface) {
12101210
$value = $value->format('d');
@@ -1294,7 +1294,7 @@ public function whereYear($column, $operator, $value = null, $boolean = 'and')
12941294
$value, $operator, func_num_args() === 2
12951295
);
12961296

1297-
$value = is_array($value) ? head($value) : $value;
1297+
$value = $this->scalarValue($value);
12981298

12991299
if ($value instanceof DateTimeInterface) {
13001300
$value = $value->format('Y');

0 commit comments

Comments
 (0)