diff --git a/web/ajax/modals/filterdebug.php b/web/ajax/modals/filterdebug.php index f3a961874..d3ffaaf01 100644 --- a/web/ajax/modals/filterdebug.php +++ b/web/ajax/modals/filterdebug.php @@ -11,13 +11,20 @@ No filter id specified.'; - } else { - $filter = new ZM\Filter($_REQUEST['fid']); + + $filter = null; + if ($fid) { + $filter = new ZM\Filter($fid); if (!$filter->Id()) { echo '
Filter not found for id '.$_REQUEST['fid'].'
'; } + } else { + $filter = new ZM\Filter(); + if ( isset($_REQUEST['filter'])) { + $filter->set($_REQUEST['filter']); + } else { + echo '
No filter id or contents specified.
'; + } } ?>