Skip to content

Commit b72097d

Browse files
authored
Replaced PHP8-only str_contains method
Update patch to be equal to the hotfix in https://support.magento.com/hc/en-us/articles/4408021533069-Adobe-Commerce-upgrade-2-4-3-2-3-7-p1-PHP-Fatal-error-Hotfix
1 parent cda98b5 commit b72097d

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 ('' === $file || false !== strpos($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)