From 39fc5ab48eaf1248fefc5c1098aa982b95de6f40 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 20 Dec 2011 15:52:27 +0000 Subject: [PATCH] mending Warnings: Cannot use a scalar value as an array --- phpgwapi/inc/class.vfs_stream_wrapper.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php index efe2487bce..7fc51fbdb2 100644 --- a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php @@ -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)