mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Calendar: Avoid "PHP Warning: count(): Parameter must be an array or an object that implements Countable" in error_log
This commit is contained in:
parent
25e6f123d0
commit
f1783dd13c
@ -247,8 +247,16 @@ class calendar_boupdate extends calendar_bo
|
|||||||
if ($event['videoconference'] && !empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call')
|
if ($event['videoconference'] && !empty($event['##videoconference']) && class_exists('EGroupware\\Status\\Videoconference\\Call')
|
||||||
&& !EGroupware\Status\Hooks::isVideoconferenceDisabled() && ($videoconferenceResId = \EGroupware\Status\Hooks::getVideoconferenceResourceId()))
|
&& !EGroupware\Status\Hooks::isVideoconferenceDisabled() && ($videoconferenceResId = \EGroupware\Status\Hooks::getVideoconferenceResourceId()))
|
||||||
{
|
{
|
||||||
|
$participant_total = 0;
|
||||||
|
foreach(['u','e','c'] as $p_type)
|
||||||
|
{
|
||||||
|
if(is_array($event['participant_types'][$p_type]))
|
||||||
|
{
|
||||||
|
$participant_total += count($event['participant_types'][$p_type]);
|
||||||
|
}
|
||||||
|
}
|
||||||
$event['participant_types']['r'][$videoconferenceResId] =
|
$event['participant_types']['r'][$videoconferenceResId] =
|
||||||
$event['participants']['r'.$videoconferenceResId] = 'A'.(count($event['participant_types']['u']) + count($event['participant_types']['e']) + count($event['participant_types']['c']));
|
$event['participants']['r'.$videoconferenceResId] = 'A'.$participant_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for conflicts only happens !$ignore_conflicts AND if start + end date are given
|
// check for conflicts only happens !$ignore_conflicts AND if start + end date are given
|
||||||
|
Loading…
Reference in New Issue
Block a user