Skip to content

Commit e6d01af

Browse files
authored
[11.x] Remove $except property from ExcludesPaths trait (#50644)
* Remove $except from trait * Update getExcludedPaths method
1 parent 578c882 commit e6d01af

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

src/Illuminate/Foundation/Http/Middleware/Concerns/ExcludesPaths.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
trait ExcludesPaths
66
{
7-
/**
8-
* The URIs that should be excluded.
9-
*
10-
* @var array<int, string>
11-
*/
12-
protected $except = [];
13-
147
/**
158
* Determine if the request has a URI that should be excluded.
169
*
@@ -39,6 +32,6 @@ protected function inExceptArray($request)
3932
*/
4033
public function getExcludedPaths()
4134
{
42-
return $this->except;
35+
return $this->except ?? [];
4336
}
4437
}

src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class PreventRequestsDuringMaintenance
2121
*/
2222
protected $app;
2323

24+
/**
25+
* The URIs that should be excluded.
26+
*
27+
* @var array<int, string>
28+
*/
29+
protected $except = [];
30+
2431
/**
2532
* The URIs that should be accessible during maintenance.
2633
*

src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ class VerifyCsrfToken
3434
*/
3535
protected $encrypter;
3636

37+
/**
38+
* The URIs that should be excluded.
39+
*
40+
* @var array<int, string>
41+
*/
42+
protected $except = [];
43+
3744
/**
3845
* The globally ignored URIs that should be excluded from CSRF verification.
3946
*

0 commit comments

Comments
 (0)