Check to make sure we're in a JSON request before accessing it

This commit is contained in:
nathangray 2017-12-14 14:33:53 -07:00
parent 1666caaf10
commit e6b0ed7fee

View File

@ -699,7 +699,7 @@ class timesheet_ui extends timesheet_bo
} }
} }
// Update start / end dates for custom // Update start / end dates for custom
if($query_in['filter'] != 'custom') if($query_in['filter'] != 'custom' && Api\Json\Response::isJSONResponse())
{ {
Api\Json\Response::get()->call( Api\Json\Response::get()->call(
'app.timesheet.update_timespan', 'app.timesheet.update_timespan',