@@ -79,7 +79,7 @@ public function extractSearch($columns = null, $options = []): array
7979 if ($ options ) {
8080 return [$ columns , $ options ];
8181 }
82- if (is_callable ($ columns )) {
82+ if (is_callable ($ columns ) && ! is_string ( $ columns ) ) {
8383 $ options = $ columns ;
8484 $ columns = null ;
8585
@@ -100,7 +100,7 @@ public function extractSearch($columns = null, $options = []): array
100100
101101 protected function extractOptionsFull ($ type , $ column , $ operator , $ value , $ boolean , $ not , $ options = []): array
102102 {
103- if (is_callable ($ column )) {
103+ if (is_callable ($ column ) && ! is_string ( $ column ) ) {
104104 // The query is a closure, return it as is
105105 return [$ column , $ operator , $ value , $ boolean , $ not , $ options ];
106106 }
@@ -129,7 +129,7 @@ protected function extractOptionsFull($type, $column, $operator, $value, $boolea
129129 }
130130 $ allowedOptions = $ this ->returnAllowedOptions ();
131131
132- if ($ value ) {
132+ if ($ value && ! is_string ( $ value ) ) {
133133 // If either is callable or an array containing valid operators, then we have options
134134 if (is_callable ($ value ) || (is_array ($ value ) && count (array_intersect (array_keys ($ value ), $ allowedOptions )))) {
135135 $ options = $ this ->parseOptions ($ value );
@@ -141,7 +141,7 @@ protected function extractOptionsFull($type, $column, $operator, $value, $boolea
141141 }
142142
143143 // Last, let's assess the operator
144- if ($ operator ) {
144+ if ($ operator && ! is_string ( $ operator ) ) {
145145 // If either is callable or an array containing valid operators, then we have options
146146 if (is_callable ($ operator ) || (is_array ($ operator ) && count (array_intersect (array_keys ($ operator ), $ allowedOptions )))) {
147147 $ options = $ this ->parseOptions ($ operator );
0 commit comments