File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2529,8 +2529,8 @@ protected function isLiteral(string $str): bool
2529
2529
return true ;
2530
2530
}
2531
2531
2532
- if (empty ( $ this ->isLiteralStr ) ) {
2533
- $ this ->isLiteralStr = ( $ this ->db ->escapeChar !== '" ' ) ? ['" ' , "' " ] : ["' " ];
2532
+ if ($ this ->isLiteralStr === [] ) {
2533
+ $ this ->isLiteralStr = $ this ->db ->escapeChar !== '" ' ? ['" ' , "' " ] : ["' " ];
2534
2534
}
2535
2535
2536
2536
return in_array ($ str [0 ], $ this ->isLiteralStr , true );
@@ -2612,10 +2612,10 @@ protected function resetWrite()
2612
2612
*/
2613
2613
protected function hasOperator (string $ str ): bool
2614
2614
{
2615
- return ( bool ) preg_match (
2615
+ return preg_match (
2616
2616
'/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i ' ,
2617
2617
trim ($ str )
2618
- );
2618
+ ) === 1 ;
2619
2619
}
2620
2620
2621
2621
/**
@@ -2625,8 +2625,8 @@ protected function hasOperator(string $str): bool
2625
2625
*/
2626
2626
protected function getOperator (string $ str , bool $ list = false )
2627
2627
{
2628
- if (empty ( $ this ->pregOperators ) ) {
2629
- $ _les = ( $ this ->db ->likeEscapeStr !== '' )
2628
+ if ($ this ->pregOperators === [] ) {
2629
+ $ _les = $ this ->db ->likeEscapeStr !== ''
2630
2630
? '\s+ ' . preg_quote (trim (sprintf ($ this ->db ->likeEscapeStr , $ this ->db ->likeEscapeChar )), '/ ' )
2631
2631
: '' ;
2632
2632
$ this ->pregOperators = [
You can’t perform that action at this time.
0 commit comments