aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlfredo Ramos <alfredo.ramos.sanchez@gmail.com>2019-09-03 17:21:51 -0500
committerAlfredo Ramos <alfredo.ramos.sanchez@gmail.com>2019-09-03 17:29:14 -0500
commit2224a76c24319b7f9456ecc42f16e22d38178ee0 (patch)
tree4eb1eed73a18a500287bc5f794c27a5fc6b2d275
parent4db585a4cb2e5359074a82ef088574609155294b (diff)
downloadforums-2224a76c24319b7f9456ecc42f16e22d38178ee0.tar
forums-2224a76c24319b7f9456ecc42f16e22d38178ee0.tar.gz
forums-2224a76c24319b7f9456ecc42f16e22d38178ee0.tar.bz2
forums-2224a76c24319b7f9456ecc42f16e22d38178ee0.tar.xz
forums-2224a76c24319b7f9456ecc42f16e22d38178ee0.zip
[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
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php
index bfafdf5ddd..c5be284d8c 100644
--- a/phpBB/phpbb/filesystem/filesystem.php
+++ b/phpBB/phpbb/filesystem/filesystem.php
@@ -835,7 +835,7 @@ class filesystem implements filesystem_interface
$current_path = $resolved_path . '/' . $path_part;
// Resolve symlinks
- if (is_link($current_path))
+ if (@is_link($current_path))
{
if (!function_exists('readlink'))
{
@@ -872,12 +872,12 @@ class filesystem implements filesystem_interface
$resolved_path = false;
}
- else if (is_dir($current_path . '/'))
+ else if (@is_dir($current_path . '/'))
{
$resolved[] = $path_part;
$resolved_path = $current_path;
}
- else if (is_file($current_path))
+ else if (@is_file($current_path))
{
$resolved[] = $path_part;
$resolved_path = $current_path;