We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb90bcd commit 5a446eeCopy full SHA for 5a446ee
main/inc/lib/agenda.lib.php
@@ -1110,18 +1110,20 @@ public function getEvents(
1110
break;
1111
}
1112
1113
- if (!empty($this->events)) {
1114
- switch ($format) {
1115
- case 'json':
1116
- return json_encode($this->events);
1117
- break;
1118
- case 'array':
1119
- return $this->events;
1120
1121
- }
+ switch ($format) {
+ case 'json':
+ if (empty($this->events)) {
+ return '';
+ }
+ return json_encode($this->events);
+ break;
+ case 'array':
1122
+ return [];
1123
1124
+ return $this->events;
1125
1126
-
- return '';
1127
1128
1129
/**
0 commit comments