forked from extern/egroupware
* Admin: fix white screen (fatal error) when trying to delete a user without home directory
This commit is contained in:
parent
38e62c53c7
commit
29b578cd0b
@ -758,13 +758,13 @@ class egw_vfs extends vfs_stream_wrapper
|
|||||||
* @param string $path path
|
* @param string $path path
|
||||||
* @param int $check mode to check: one or more or'ed together of: 4 = egw_vfs::READABLE,
|
* @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
|
* 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)
|
* @param int $user=null user used for check, if not current user (egw_vfs::$user)
|
||||||
* @return boolean
|
* @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();
|
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
|
// throw exception if stat array is used insead of path, can be removed soon
|
||||||
if (is_array($path))
|
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
|
// query stat array, if not given
|
||||||
if (is_null($stat))
|
if (is_null($stat))
|
||||||
|
Loading…
Reference in New Issue
Block a user