fix PHP 8.0 Warning: Argument #2 of array_merge must be of type array, boolean given

This commit is contained in:
Ralf Becker 2021-10-04 11:01:32 +02:00
parent 6a031ef45c
commit 1cd5755ae4

View File

@ -295,7 +295,7 @@ class Base
'host' => $GLOBALS['egw_info']['user']['domain'],
'home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory']),
);
$parts = array_merge(Vfs::parse_url($_path), Vfs::parse_url($path), $defaults);
$parts = array_merge(Vfs::parse_url($_path), Vfs::parse_url($path) ?: [], $defaults);
if(!$parts['host'])
{
// otherwise we get an invalid url (scheme:///path/to/something)!