Allow callable strings/arrays to be used

This commit is contained in:
Toby Zerner 2021-05-05 14:21:15 +09:30
parent f0c7ed513e
commit 569371b4d2
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ function negate(Closure $condition)
function wrap($value) function wrap($value)
{ {
if (! $value instanceof Closure) { if (! is_callable($value)) {
$value = function () use ($value) { $value = function () use ($value) {
return $value; return $value;
}; };