Skip to content

Commit 723e283

Browse files
AC-384: Fix Incompatible PHP Method (#42)
1 parent 3498b37 commit 723e283

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

patches.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@
256256
">=2.3.4 <2.3.5": "MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.4.patch",
257257
">=2.3.5 <2.3.6": "MCLOUD-6211__redis_improvement_patches__2.3.5.patch",
258258
">=2.4.0 <2.4.1": "MCLOUD-6659__fix_L2_redis_cache__2.4.0.patch"
259+
},
260+
"Incompatible PHP Method Fix": {
261+
"2.3.7-p1": "AC-384__Fix_Incompatible_PHP_Method__2.3.7-p1_ce.patch",
262+
"2.4.3": "AC-384__Fix_Incompatible_PHP_Method__2.4.3_ce.patch"
259263
}
260264
},
261265
"magento/module-paypal": {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -Nuar a/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php b/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php
2+
--- a/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php (revision d40e8cbfd24ac841900166877e9910f9d549fdf5)
3+
+++ b/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php (revision 7d6a3eeb669d4a11978bf639dc2536ef23d56d09)
4+
@@ -71,7 +71,7 @@
5+
6+
foreach ($this->fileDenyList as $file) {
7+
$baseName = pathinfo($actualPath, PATHINFO_BASENAME);
8+
- if (str_contains($baseName, $file) || preg_match('#' . "\." . $file . '#', $fullPath)) {
9+
+ if (strpos($baseName, $file) !== false || preg_match('#' . "\." . $file . '#', $fullPath)) {
10+
throw new ValidatorException(
11+
new Phrase('"%1" is not a valid file path', [$path])
12+
);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -Nuar a/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php b/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php
2+
--- a/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php (revision d40e8cbfd24ac841900166877e9910f9d549fdf5)
3+
+++ b/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php (revision 7d6a3eeb669d4a11978bf639dc2536ef23d56d09)
4+
@@ -71,7 +71,7 @@
5+
6+
foreach ($this->fileDenyList as $file) {
7+
$baseName = pathinfo($actualPath, PATHINFO_BASENAME);
8+
- if (str_contains($baseName, $file) || preg_match('#' . "\." . $file . '#', $fullPath)) {
9+
+ if (strpos($baseName, $file) !== false || preg_match('#' . "\." . $file . '#', $fullPath)) {
10+
throw new ValidatorException(
11+
new Phrase('"%1" is not a valid file path', [$path])
12+
);

0 commit comments

Comments
 (0)