mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 07:58:56 +02:00
[ticket/15643] Fix open_basedir warnings
Suppress warnings when trying to call is_link(), is_dir() and is_file() on the web server root directory when open_basedir is set. PHPBB3-15643
This commit is contained in:
parent
4db585a4cb
commit
2224a76c24
@ -835,7 +835,7 @@ class filesystem implements filesystem_interface
|
|||||||
$current_path = $resolved_path . '/' . $path_part;
|
$current_path = $resolved_path . '/' . $path_part;
|
||||||
|
|
||||||
// Resolve symlinks
|
// Resolve symlinks
|
||||||
if (is_link($current_path))
|
if (@is_link($current_path))
|
||||||
{
|
{
|
||||||
if (!function_exists('readlink'))
|
if (!function_exists('readlink'))
|
||||||
{
|
{
|
||||||
@ -872,12 +872,12 @@ class filesystem implements filesystem_interface
|
|||||||
|
|
||||||
$resolved_path = false;
|
$resolved_path = false;
|
||||||
}
|
}
|
||||||
else if (is_dir($current_path . '/'))
|
else if (@is_dir($current_path . '/'))
|
||||||
{
|
{
|
||||||
$resolved[] = $path_part;
|
$resolved[] = $path_part;
|
||||||
$resolved_path = $current_path;
|
$resolved_path = $current_path;
|
||||||
}
|
}
|
||||||
else if (is_file($current_path))
|
else if (@is_file($current_path))
|
||||||
{
|
{
|
||||||
$resolved[] = $path_part;
|
$resolved[] = $path_part;
|
||||||
$resolved_path = $current_path;
|
$resolved_path = $current_path;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user