In L187 you test for `$_event` to be an array. Here you are giving that for granted. If `$_event` will always be an array (it looks like so), please remove `is_array($_event)` test in L187.
Thanks