From 7a4dd368b5d8841b1835ba3d902b33a3327f7f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Thu, 21 Sep 2017 22:34:20 +0200 Subject: [PATCH] [ticket/15371] Return an empty string if the array has no elements PHPBB3-15371 --- phpBB/phpbb/storage/adapter/local.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index f963f282c0..66f5b32d37 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -257,7 +257,7 @@ class local implements adapter_interface, stream_interface $parts = str_split($hash, 2); $parts = array_slice($parts, 0, $this->dir_depth); - return implode(DIRECTORY_SEPARATOR, $parts) . DIRECTORY_SEPARATOR; + return (!empty($parts)) ? implode(DIRECTORY_SEPARATOR, $parts) . DIRECTORY_SEPARATOR : ''; } /**