// if it's a json request abort here becaus we don't
// need the widget data
- if ($a->argv[2] === 'json') {
+ if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
return;
}
$finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59);
- if ($a->argv[2] === 'json') {
+ if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
if (x($_GET, 'start')) {
$start = $_GET['start'];
}
// transform the event in a usable array
$events = Event::prepareListForTemplate($r);
- if ($a->argv[2] === 'json') {
+ if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
echo json_encode($events);
killme();
}