Commit f812c25
committed
Security/EscapeOutput: make basename( __FILE__ ) pattern matching case-insensitive
The sniff has special handling for `_deprecated_file()` calls where the first parameter follows the `basename( __FILE__ )` pattern.
The regex pattern was case-sensitive, which meant it would only match lowercase `basename()` and uppercase `__FILE__`. This is incorrect because both function names and magic constants (https://3v4l.org/8nAEV and https://www.php.net/manual/en/language.constants.magic.php) in PHP are case-insensitive.
This commit fixes the regex pattern to be case-insensitive.1 parent adaf62d commit f812c25
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| |||
0 commit comments