check if parameter of setNoAccess() is set before using it

This commit is contained in:
Uwe Steinmann 2016-04-13 18:29:21 +02:00
parent 76beca23c6
commit b80cb91d54

View File

@ -169,7 +169,7 @@ class SeedDMS_Core_Role { /* {{{ */
function setNoAccess($noaccess) { /* {{{ */
$db = $this->_dms->getDB();
$queryStr = "UPDATE tblRoles SET noaccess = " . $db->qstr(implode(',',$noaccess)) . " WHERE id = " . $this->_id;
$queryStr = "UPDATE tblRoles SET noaccess = " . $db->qstr($noaccess ? implode(',',$noaccess) : '') . " WHERE id = " . $this->_id;
if (!$db->getResult($queryStr))
return false;