From 9ff25b5970d8665ba55485d9991e5c7126a92382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Tue, 27 Jun 2017 12:20:41 +0200 Subject: [PATCH] [ticket/15253] Replace realpath with helper PHPBB3-15253 --- phpBB/phpbb/filesystem/filesystem.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php index 80474cb0a2..7754a4107b 100644 --- a/phpBB/phpbb/filesystem/filesystem.php +++ b/phpBB/phpbb/filesystem/filesystem.php @@ -468,27 +468,7 @@ class filesystem implements filesystem_interface */ public function realpath($path) { - if (!function_exists('realpath')) - { - return $this->phpbb_own_realpath($path); - } - - $realpath = realpath($path); - - // Strangely there are provider not disabling realpath but returning strange values. :o - // We at least try to cope with them. - if ((!$this->is_absolute_path($path) && $realpath === $path) || $realpath === false) - { - return $this->phpbb_own_realpath($path); - } - - // Check for DIRECTORY_SEPARATOR at the end (and remove it!) - if (substr($realpath, -1) === DIRECTORY_SEPARATOR) - { - $realpath = substr($realpath, 0, -1); - } - - return $realpath; + return helper::realpath($path); } /**