Skip to content

Commit 467239c

Browse files
committed
Support invokables in conditions, not just Closures
1 parent 2570c24 commit 467239c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function wrap($value)
3434

3535
function evaluate($condition, array $params)
3636
{
37-
return $condition === true || ($condition instanceof Closure && $condition(...$params));
37+
return $condition === true || (is_callable($condition) && $condition(...$params));
3838
}
3939

4040
function run_callbacks(array $callbacks, array $params)

0 commit comments

Comments
 (0)