Skip to content

Commit ae0ef96

Browse files
committed
correction orIsNull and orIsNotNull
1 parent d973b2b commit ae0ef96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Request.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,10 @@ public function __toString()
699699
*/
700700
public function __call( $name, $arg )
701701
{
702+
if($this->where === null)
703+
{
704+
$this->where = new Where();
705+
}
702706
if( method_exists($this->where, $name) )
703707
{
704708
if( $name === 'in' && is_callable($arg[ 1 ]) )

src/Where.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function isNull( $column, $condition = '===', $bool = 'and',
347347
*/
348348
public function isNotNull( $column )
349349
{
350-
$this->isNull($column, '!==', 'and', true);
350+
$this->isNull($column, '===', 'and', true);
351351
return $this;
352352
}
353353

@@ -373,7 +373,7 @@ public function orIsNull( $column )
373373
*/
374374
public function orIsNotNull( $column )
375375
{
376-
$this->isNull($column, '!==', 'or', true);
376+
$this->isNull($column, '===', 'or', true);
377377
return $this;
378378
}
379379

0 commit comments

Comments
 (0)