From 52760a95d9d21c1e95968ff38a719f31f128ba5a Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 16 Dec 2021 17:04:10 +0100 Subject: Check if directoy is writable instead of possibly missing file Signed-off-by: Carl Schwan --- apps/user_ldap/lib/LDAP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/user_ldap/lib/LDAP.php') diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 900f5a7030f..8f1d63f95eb 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -352,7 +352,7 @@ class LDAP implements ILDAPWrapper { $this->curFunc = $functionName; $this->curArgs = $args; - if ($this->logFile !== '' && is_writable($this->logFile)) { + if ($this->logFile !== '' && is_writable(dirname($this->logFile)) && (!file_exists($this->logFile) || is_writable($this->logFile))) { $args = array_reduce($this->curArgs, static function (array $carry, $item): array { $carry[] = !is_resource($item) ? $item : '(resource)'; return $carry; -- cgit v1.2.3