Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118004046
D4022.1775549175.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D4022.1775549175.diff
View Options
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -112,11 +112,11 @@
public function get_storage_folder($id)
{
// resolve alias name
- if ($this->aliases[$id]) {
+ if (!empty($this->aliases[$id])) {
$id = $this->aliases[$id];
}
- if ($this->folders[$id]) {
+ if (!empty($this->folders[$id])) {
DAVBackend::check_storage_folder($this->folders[$id]);
return $this->folders[$id];
}
@@ -180,11 +180,11 @@
$id = $calendarUri;
// resolve aliases (calendar by folder name)
- if ($this->aliases[$calendarUri]) {
+ if (!empty($this->aliases[$calendarUri])) {
$id = $this->aliases[$calendarUri];
}
- if ($this->calendars[$id] && empty($this->calendars[$id]['principaluri'])) {
+ if (!empty($this->calendars[$id]) && empty($this->calendars[$id]['principaluri'])) {
$this->calendars[$id]['principaluri'] = 'principals/' . HTTPBasic::$current_user;
}
diff --git a/lib/Kolab/DAV/Auth/HTTPBasic.php b/lib/Kolab/DAV/Auth/HTTPBasic.php
--- a/lib/Kolab/DAV/Auth/HTTPBasic.php
+++ b/lib/Kolab/DAV/Auth/HTTPBasic.php
@@ -74,7 +74,7 @@
}
// LDAP server failure... send 503 error
- if ($auth['kolab_ldap_error']) {
+ if (!empty($auth['kolab_ldap_error'])) {
throw new ServiceUnavailable('The service is temporarily unavailable (LDAP failure)');
}
}
@@ -86,7 +86,8 @@
}
// authenticate user against the IMAP server
- $user_id = $auth['abort'] ? 0 : $this->_login($auth['user'], $auth['pass'], $auth['host'], $error);
+ $error = null;
+ $user_id = !empty($auth['abort']) ? 0 : $this->_login($auth['user'], $auth['pass'], $auth['host'], $error);
if ($user_id) {
self::$current_user = $auth['user'];
@@ -97,12 +98,12 @@
return true;
}
- if ($error) {
- $error_str = rcube::get_instance()->get_storage()->get_error_str();
- }
-
if (class_exists('kolab_auth')) {
- \kolab_auth::log_login_error($auth['user'], $error_str ?: $error);
+ if ($error) {
+ $error_str = rcube::get_instance()->get_storage()->get_error_str();
+ }
+
+ \kolab_auth::log_login_error($auth['user'], $error_str ?? null);
}
// IMAP server failure... send 503 error
@@ -192,7 +193,7 @@
}
}
- if (!$port) {
+ if (empty($port)) {
$port = $default_port;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 8:06 AM (15 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18834810
Default Alt Text
D4022.1775549175.diff (2 KB)
Attached To
Mode
D4022: php8 fixes
Attached
Detach File
Event Timeline