Skip to content

Commit 9a4c76c

Browse files
authored
revert changes to old() helper (#56769)
this is a breaking change, as previously users could pass any type of value to `$default`. with this change it forces all `$default`s to be `string|array|null`.
1 parent 36ff6ed commit 9a4c76c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Foundation/helpers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ function now($tz = null): CarbonInterface
630630
*
631631
* @param string|null $key
632632
* @param \Illuminate\Database\Eloquent\Model|string|array|null $default
633+
* @return string|array|null
633634
*/
634-
function old($key = null, $default = null): string|array|null
635+
function old($key = null, $default = null)
635636
{
636637
return app('request')->old($key, $default);
637638
}

0 commit comments

Comments
 (0)