From 29b578cd0b72dc6108c55276761a8619c357d173 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 Nov 2011 08:38:23 +0000 Subject: [PATCH] * Admin: fix white screen (fatal error) when trying to delete a user without home directory --- phpgwapi/inc/class.egw_vfs.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index 9f8e7bf17a..db82a925f8 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -758,13 +758,13 @@ class egw_vfs extends vfs_stream_wrapper * @param string $path path * @param int $check mode to check: one or more or'ed together of: 4 = egw_vfs::READABLE, * 2 = egw_vfs::WRITABLE, 1 = egw_vfs::EXECUTABLE - * @param array $stat=null stat array, to not query it again + * @param array|boolean $stat=null stat array or false, to not query it again * @param int $user=null user used for check, if not current user (egw_vfs::$user) * @return boolean */ - static function check_access($path, $check, array $stat=null, $user=null) + static function check_access($path, $check, $stat=null, $user=null) { - if (!$stat && $user && $user != self::$user) + if (is_null($stat) && $user && $user != self::$user) { static $path_user_stat = array(); @@ -809,7 +809,7 @@ class egw_vfs extends vfs_stream_wrapper // throw exception if stat array is used insead of path, can be removed soon if (is_array($path)) { - throw new egw_exception_wrong_parameter('path has to be string, use check_acces($path,$check,$stat=null)!'); + throw new egw_exception_wrong_parameter('path has to be string, use check_access($path,$check,$stat=null)!'); } // query stat array, if not given if (is_null($stat))