Skip to content

Commit bbbc51d

Browse files
committed
fix: zero value for opration
1 parent f4110c7 commit bbbc51d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function fix_column_name($name){
6868
}
6969

7070
protected function fix_operator_and_value(&$operator, &$value){
71-
if($value == false || $value == null){
71+
if($value === false || $value === null){
7272
$value = $operator;
7373
$operator = '=';
7474
}

tests/SelectTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,9 @@ public function testEach()
157157

158158
$this->assertSame( 6 , $index);
159159
}
160+
161+
public function testSelectAmount(){
162+
$count = DB::table('books')->where('amount', '>', 0)->count();
163+
$this->assertEquals($count, 3);
164+
}
160165
}

0 commit comments

Comments
 (0)