Skip to content

Commit f942ad8

Browse files
committed
(+) fix whereDay and whereMonth
1 parent 9e8a63e commit f942ad8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Query/Builder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ protected function compileWhereDay(array $where)
12311231
extract($where);
12321232

12331233
$operator = $operator === '=' ? '$eq' : $this->conversion[$operator];
1234+
$value = str_starts_with($value, '0') ? intval(str_replace('0', '', $value)) : $value;
12341235

12351236
return [
12361237
'$expr' => [
@@ -1253,6 +1254,7 @@ protected function compileWhereYear(array $where)
12531254
extract($where);
12541255

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

12571259
return [
12581260
'$expr' => [

0 commit comments

Comments
 (0)