From 53034ef154517ee0129cf3970f9747cc1ea87886 Mon Sep 17 00:00:00 2001 From: Warxcell Date: Wed, 4 May 2022 13:20:30 +0300 Subject: [PATCH] Use Closure instance check. --- src/Filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filters.php b/src/Filters.php index ebfd0f0..036af48 100644 --- a/src/Filters.php +++ b/src/Filters.php @@ -80,7 +80,7 @@ public function appendFilter(QueryBuilder $queryBuilder, string $alias, string $ return false; } - if (count($values) === 1 && is_callable($values[0])) { + if (count($values) === 1 && $values[0] instanceof \Closure) { call_user_func_array($values[0], [$queryBuilder, $alias]); } else { $filter = $this->getFilter($filterName);