FIX : db escape

This commit is contained in:
Gauthier PC portable 024 2021-10-06 17:47:27 +02:00
parent a271bb8316
commit 2efea59614

View File

@ -217,7 +217,7 @@ class SkillRank extends CommonObject
{
global $langs;
$sqlfilter = 'fk_object='.$this->fk_object." AND objecttype='".$this->objecttype."' AND fk_skill = ".((int) $this->fk_skill);
$sqlfilter = 'fk_object='.$this->fk_object." AND objecttype='".$this->db->escape($this->objecttype)."' AND fk_skill = ".((int) $this->fk_skill);
$alreadyLinked = $this->fetchAll('ASC', 'rowid', 0, 0, array('customsql' => $sqlfilter));
if (!empty($alreadyLinked)) {
$this->error = $langs->trans('ErrSkillAlreadyAdded');