Skip to content

Commit 2ca9186

Browse files
committed
[Support] Remove double check $value === $default in Arr::array
1 parent 8ddfe27 commit 2ca9186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Collections/Arr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function array(ArrayAccess|array $array, string|int|null $key, arr
7777
{
7878
$value = Arr::get($array, $key, $default);
7979

80-
if ($throwOnNotFound && $value === $default && ! Arr::has($array, $key)) {
80+
if ($throwOnNotFound && ! Arr::has($array, $key)) {
8181
throw new ItemNotFoundException(
8282
sprintf('Array key [%s] not found.', $key)
8383
);

0 commit comments

Comments
 (0)