Skip to content

Commit d37cdf6

Browse files
committed
(+) move value conversion from whereYear to whereMonth
1 parent f942ad8 commit d37cdf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,7 @@ protected function compileWhereMonth(array $where)
12091209
extract($where);
12101210

12111211
$operator = $operator === '=' ? '$eq' : $this->conversion[$operator];
1212+
$value = str_starts_with($value, '0') ? intval(str_replace('0', '', $value)) : $value;
12121213

12131214
return [
12141215
'$expr' => [
@@ -1254,7 +1255,6 @@ protected function compileWhereYear(array $where)
12541255
extract($where);
12551256

12561257
$operator = $operator === '=' ? '$eq' : $this->conversion[$operator];
1257-
$value = str_starts_with($value, '0') ? intval(str_replace('0', '', $value)) : $value;
12581258

12591259
return [
12601260
'$expr' => [

0 commit comments

Comments
 (0)