Index: branches/5.0.x/core/units/helpers/permissions_helper.php =================================================================== diff -u -r12306 -r12511 --- branches/5.0.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 12306) +++ branches/5.0.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 12511) @@ -1,6 +1,6 @@ Application->getUnitOption($prefix, 'TableName'); $id = $this->Application->GetVar($prefix.'_id'); - if (!$id) return $this->Application->GetVar('m_cat_id'); + if (!$id) { + return $this->Application->GetVar('m_cat_id'); + } $sql = 'SELECT ResourceId FROM '.$table_name.' - WHERE '.$id_field.' = '.$id; + WHERE '.$id_field.' = '.(int)$id; $resource_id = $this->Conn->GetOne($sql); $sql = 'SELECT CategoryId @@ -540,7 +542,7 @@ $sql = 'SELECT PermId FROM '.TABLE_PREFIX.'PermCache - WHERE (PermId = '.$perm_id.') AND (CategoryId = '.$cat_id.')'; + WHERE (PermId = '.$perm_id.') AND (CategoryId = '.(int)$cat_id.')'; $view_filters = Array(); foreach ($groups as $group) {