check if id passed to getDocumentCategory() is < 1

This commit is contained in:
Uwe Steinmann 2021-09-17 18:58:29 +02:00
parent e809297cfd
commit 3ed0854e13

View File

@ -2376,7 +2376,7 @@ class SeedDMS_Core_DMS {
} /* }}} */
function getDocumentCategory($id) { /* {{{ */
if (!is_numeric($id))
if (!is_numeric($id) || $id < 1)
return false;
$queryStr = "SELECT * FROM `tblCategory` WHERE `id` = " . (int) $id;