Skip to content

Commit bc72a3b

Browse files
ENGCOM-9192: Replaced PHP8-only str_contains method. #33886
- Merge Pull Request #33886 from reense/magento2:patch-5 - Merged commits: 1. 055d9fc 2. 5888eea 3. cda98b5 4. b72097d
2 parents 202bd44 + b72097d commit bc72a3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Filesystem/Directory/DenyListPathValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function validate(
7171

7272
foreach ($this->fileDenyList as $file) {
7373
$baseName = pathinfo($actualPath, PATHINFO_BASENAME);
74-
if (str_contains($baseName, $file) || preg_match('#' . "\." . $file . '#', $fullPath)) {
74+
if (strpos($baseName, $file) !== false || preg_match('#' . "\." . $file . '#', $fullPath)) {
7575
throw new ValidatorException(
7676
new Phrase('"%1" is not a valid file path', [$path])
7777
);

0 commit comments

Comments
 (0)