Skip to content

Commit ca3fb6b

Browse files
committed
Prevent double where condition strings
1 parent b5f4ee8 commit ca3fb6b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/IMAP/Query/WhereQuery.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ public function __call($name, $arguments) {
8181
$name = substr($name, 3);
8282
}
8383

84-
$method = 'where'.ucfirst($name);
84+
if (strpos(strtolower($name), "where") === false){
85+
$method = 'where'.ucfirst($name);
86+
}else{
87+
$method = lcfirst($name);
88+
}
89+
8590
if(method_exists($this, $method) === true){
8691
return call_user_func_array([$that, $method], $arguments);
8792
}

0 commit comments

Comments
 (0)