1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 01:20:40 +01:00

[ticket/15371] Return an empty string if the array has no elements

PHPBB3-15371
This commit is contained in:
Rubén Calvo 2017-09-21 22:34:20 +02:00
parent 5edb8f0b5b
commit 7a4dd368b5

View File

@ -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 : '';
}
/**