@@ -79,7 +79,7 @@ public function extractSearch($columns = null, $options = []): array
79
79
if ($ options ) {
80
80
return [$ columns , $ options ];
81
81
}
82
- if (is_callable ($ columns )) {
82
+ if (is_callable ($ columns ) && ! is_string ( $ columns ) ) {
83
83
$ options = $ columns ;
84
84
$ columns = null ;
85
85
@@ -100,7 +100,7 @@ public function extractSearch($columns = null, $options = []): array
100
100
101
101
protected function extractOptionsFull ($ type , $ column , $ operator , $ value , $ boolean , $ not , $ options = []): array
102
102
{
103
- if (is_callable ($ column )) {
103
+ if (is_callable ($ column ) && ! is_string ( $ column ) ) {
104
104
// The query is a closure, return it as is
105
105
return [$ column , $ operator , $ value , $ boolean , $ not , $ options ];
106
106
}
@@ -129,7 +129,7 @@ protected function extractOptionsFull($type, $column, $operator, $value, $boolea
129
129
}
130
130
$ allowedOptions = $ this ->returnAllowedOptions ();
131
131
132
- if ($ value ) {
132
+ if ($ value && ! is_string ( $ value ) ) {
133
133
// If either is callable or an array containing valid operators, then we have options
134
134
if (is_callable ($ value ) || (is_array ($ value ) && count (array_intersect (array_keys ($ value ), $ allowedOptions )))) {
135
135
$ options = $ this ->parseOptions ($ value );
@@ -141,7 +141,7 @@ protected function extractOptionsFull($type, $column, $operator, $value, $boolea
141
141
}
142
142
143
143
// Last, let's assess the operator
144
- if ($ operator ) {
144
+ if ($ operator && ! is_string ( $ operator ) ) {
145
145
// If either is callable or an array containing valid operators, then we have options
146
146
if (is_callable ($ operator ) || (is_array ($ operator ) && count (array_intersect (array_keys ($ operator ), $ allowedOptions )))) {
147
147
$ options = $ this ->parseOptions ($ operator );
0 commit comments