diff --git a/src/Illuminate/Collections/Arr.php b/src/Illuminate/Collections/Arr.php index 702bde2524d5..8267315e70e1 100644 --- a/src/Illuminate/Collections/Arr.php +++ b/src/Illuminate/Collections/Arr.php @@ -725,7 +725,9 @@ public static function where($array, callable $callback) */ public static function whereNotNull($array) { - return static::where($array, fn ($x) => ! is_null($x)); + return static::where($array, function ($value) { + return ! is_null($value); + }); } /**