Skip to content

Commit 25e285e

Browse files
authored
[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.
1 parent 877ebca commit 25e285e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Testing/TestResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public function assertHeaderMissing($headerName)
310310
public function assertLocation($uri)
311311
{
312312
PHPUnit::assertEquals(
313-
app('url')->to($uri), app('url')->to($this->headers->get('Location'))
313+
app('url')->to($uri), app('url')->to($this->headers->get('Location', ''))
314314
);
315315

316316
return $this;
@@ -324,7 +324,7 @@ public function assertLocation($uri)
324324
*/
325325
public function assertDownload($filename = null)
326326
{
327-
$contentDisposition = explode(';', $this->headers->get('content-disposition'));
327+
$contentDisposition = explode(';', $this->headers->get('content-disposition', ''));
328328

329329
if (trim($contentDisposition[0]) !== 'attachment') {
330330
PHPUnit::fail(

0 commit comments

Comments
 (0)