Skip to content

Commit

Permalink
Update whereDay and whereYear to clean value.
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneCohen committed Jan 21, 2021
1 parent 9d3752c commit dbbb1c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Query/Builder.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit dbbb1c1

Please sign in to comment.