mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
#139 Improved string size verification, the rule is guaranteed by the core
SVN:trunk[721]
This commit is contained in:
@@ -636,7 +636,15 @@ abstract class DBObject
|
||||
return "Value not allowed [$toCheck]";
|
||||
}
|
||||
}
|
||||
elseif (!$oAtt->CheckFormat($toCheck))
|
||||
if (!is_null($iMaxSize = $oAtt->GetMaxSize()))
|
||||
{
|
||||
$iLen = strlen($toCheck);
|
||||
if ($iLen > $iMaxSize)
|
||||
{
|
||||
return "String too long (found $iLen, limited to $iMaxSize)";
|
||||
}
|
||||
}
|
||||
if (!$oAtt->CheckFormat($toCheck))
|
||||
{
|
||||
return "Wrong format [$toCheck]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user