mending Warnings: Cannot use a scalar value as an array

This commit is contained in:
Klaus Leithoff 2011-12-20 15:52:27 +00:00
parent 16d7185548
commit 39fc5ab48e

View File

@ -600,7 +600,9 @@ class vfs_stream_wrapper implements iface_stream_wrapper
{
return false;
}
$scheme2urls[(string)parse_url($url,PHP_URL_SCHEME)][$path] = $url;
$k=(string)parse_url($url,PHP_URL_SCHEME);
if (!(is_array($scheme2urls[$k]))) $scheme2urls[$k] = array();
$scheme2urls[$k][$path] = $url;
}
$ret = array();
foreach($scheme2urls as $scheme => $urls)