check if passed categories actually exist

This commit is contained in:
Uwe Steinmann 2022-03-04 08:20:45 +01:00
parent a4afc1cfa7
commit 8fdc151198

View File

@ -69,9 +69,10 @@ if($fullsearch) {
$category = $_GET['category'];
foreach($_GET['category'] as $catid) {
if($catid) {
$cat = $dms->getDocumentCategory($catid);
$categories[] = $cat;
$categorynames[] = $cat->getName();
if($cat = $dms->getDocumentCategory($catid)) {
$categories[] = $cat;
$categorynames[] = $cat->getName();
}
}
}
}