From 8030c477c910b84dc3b60b3edcdf39bd38ceed60 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 11 May 2018 11:25:02 -0600 Subject: [PATCH] Avoid warning about scheme already registered --- api/src/Vfs/StreamWrapper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/Vfs/StreamWrapper.php b/api/src/Vfs/StreamWrapper.php index 06d29dfc1f..966c355708 100644 --- a/api/src/Vfs/StreamWrapper.php +++ b/api/src/Vfs/StreamWrapper.php @@ -1323,6 +1323,9 @@ class StreamWrapper implements StreamWrapperIface */ static function init_static() { + if (in_array(self::SCHEME, stream_get_wrappers())) { + stream_wrapper_unregister(self::SCHEME); + } stream_register_wrapper(self::SCHEME,__CLASS__); if (($fstab = $GLOBALS['egw_info']['server']['vfs_fstab']) && is_array($fstab) && count($fstab))