Reqiure Id to have a value not just be set

This commit is contained in:
Isaac Connor 2020-11-04 09:18:41 -05:00
parent c72ceffe3d
commit af399bb174
1 changed files with 2 additions and 3 deletions

View File

@ -35,13 +35,12 @@ $filterNames = array(''=>translate('ChooseFilter'));
$filter = NULL;
$fid = 0;
if ( isset($_REQUEST['Id']) ) {
if ( isset($_REQUEST['Id']) and $_REQUEST['Id'] ) {
$fid = validInt($_REQUEST['Id']);
} else if ( isset($_REQUEST['filter[Id]']) ) {
$fid = validInt($_REQUEST['filter[Id]']);
ZM\Warning("got fid by object id $fid");
}
$filter = null;
foreach ( ZM\Filter::find(null,array('order'=>'lower(Name)')) as $Filter ) {
$filterNames[$Filter->Id()] = $Filter->Id() . ' ' . $Filter->Name();
if ( $Filter->Background() )