From 25e285e2fe99a6a8f43af493a0be6937de93cd39 Mon Sep 17 00:00:00 2001 From: Aldo Barreras Date: Mon, 22 Apr 2024 09:20:30 -0400 Subject: [PATCH] [10.x] Address Null Parameter Deprecations in UrlGenerator (#51148) * Replace null values with empty strings for strpos. Replace null values with empty strings for preg_match. * Revert change to UrlGenerator. Change default header get to empty string. --- src/Illuminate/Testing/TestResponse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Testing/TestResponse.php b/src/Illuminate/Testing/TestResponse.php index ebf06a7dc1fd..6a583f13b651 100644 --- a/src/Illuminate/Testing/TestResponse.php +++ b/src/Illuminate/Testing/TestResponse.php @@ -310,7 +310,7 @@ public function assertHeaderMissing($headerName) public function assertLocation($uri) { PHPUnit::assertEquals( - app('url')->to($uri), app('url')->to($this->headers->get('Location')) + app('url')->to($uri), app('url')->to($this->headers->get('Location', '')) ); return $this; @@ -324,7 +324,7 @@ public function assertLocation($uri) */ public function assertDownload($filename = null) { - $contentDisposition = explode(';', $this->headers->get('content-disposition')); + $contentDisposition = explode(';', $this->headers->get('content-disposition', '')); if (trim($contentDisposition[0]) !== 'attachment') { PHPUnit::fail(