Skip to content

Commit dbbb1c1

Browse files
committed
Update whereDay and whereYear to clean value.
1 parent 9d3752c commit dbbb1c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Query/Builder.php

+2-2
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)