git.cweiske.de
/
roundcube-nextcloud_sql_addressbook.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c130567
)
Fix PHP warning: Trying to access array offset on value of type null
author
Christian Weiske
<
[email protected]
>
Fri, 21 Apr 2023 20:25:29 +0000
(22:25 +0200)
committer
Christian Weiske
<
[email protected]
>
Fri, 21 Apr 2023 20:25:29 +0000
(22:25 +0200)
> PHP Warning: Trying to access array offset on value of type null
> in plugins/nextcloud_sql_addressbook/nextcloud_sql_addressbook.php
> on line 97
nextcloud_sql_addressbook.php
patch
|
blob
|
history
diff --git
a/nextcloud_sql_addressbook.php
b/nextcloud_sql_addressbook.php
index 146aebee2e79c40b8ee465a93a2aae0863ca9359..5c52fded69b0d07bd366847e89e2fa0f8ebeced6 100644
(file)
--- a/
nextcloud_sql_addressbook.php
+++ b/
nextcloud_sql_addressbook.php
@@
-93,6
+93,10
@@
class nextcloud_sql_addressbook extends rcube_plugin
*/
protected function listAddressbooks()
{
+ if (!isset($this->rcube->user->data)) {
+ return [];
+ }
+
$principalUri = 'principals/users/'
. $this->rcube->user->data['username'];