From 6a8764c520b86ddc3dce897c5c00514f96cda3ae Mon Sep 17 00:00:00 2001 From: jobsrey Date: Mon, 20 Jul 2020 17:07:04 +0700 Subject: [PATCH] Support PHP 7 Count() must array --- yii2fullcalendar.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yii2fullcalendar.php b/yii2fullcalendar.php index 6f9a136..3b58cbc 100644 --- a/yii2fullcalendar.php +++ b/yii2fullcalendar.php @@ -270,10 +270,10 @@ protected function getClientOptions() $options['eventClick'] = new JsExpression($this->eventClick); } //checks for events and loads them into the options. Comment out if loading separately. - if (count($this->events)>0) - { - $options['events'] = $this->events; - } + if (count((Array) $this->events) > 0) + { + $options['events'] = $this->events; + } $options = array_merge($options, $this->clientOptions); return Json::encode($options); }