Skip to content
Snippets Groups Projects
Commit 9b3b4def authored by Oliver Hader's avatar Oliver Hader Committed by Christian Kuhn
Browse files

[BUGFIX] Avoid PHP warning when using Phar archive with open_basedir

Including files from Phar archives (e.g. "phar://file.phar/autoload.php")
does not work properly with having PHP setting open_basedir defined. The
reason for that is, that TYPO3's custom PharStreamWrapper tries to find
the appropriate base Phar file using file_exists() calls internally. In
case those files are not part of the open_basedir restriction - which is
the case for everything prefixed with the "phar://" scheme - a PHP
warning is shown.

Resolves: #85547
Releases: master, 8.7, 7.6
Change-Id: I72fdd7f0c016c0a8b1ed56a82b6b4042cac4d930
Reviewed-on: https://review.typo3.org/57587


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 4003c5fa
Branches
Tags
No related merge requests found
......@@ -472,7 +472,7 @@ class PharStreamWrapper
while (count($parts)) {
$currentPath = implode('/', $parts);
if (file_exists($currentPath)) {
if (@file_exists($currentPath)) {
return $currentPath;
}
array_pop($parts);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment