Calendar - check for JSON response before using it

This commit is contained in:
nathangray 2017-12-01 10:33:16 -07:00
parent 90a5e91fc7
commit 1bef3549af

View File

@ -401,7 +401,7 @@ class calendar_uilist extends calendar_ui
// App header is mostly taken care of on the client side, but here we update
// it to match changing list filters
if($params['view'] && $params['view'] == 'listview')
if($params['view'] && $params['view'] == 'listview' && Api\Json\Response::isJSONResponse())
{
Api\Json\Response::get()->call('app.calendar.set_app_header',
(count($search_params['users']) == 1 ? $this->bo->participant_name($search_params['users'][0]).': ' : '') .