Commit cf4ce890 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(core) Deprecated using setUnique with TRUE value

issue #5954
parent 0d2bb37e
......@@ -148,6 +148,7 @@ class Attribute
function setUnique ($unique, $filter = NULL)
{
if ($unique === TRUE) {
trigger_error('Deprecated fallback');
$this->unique = 'one';
} else {
$this->unique = $unique;
......
......@@ -104,7 +104,7 @@ class simpleTabs
($baseobject instanceof simplePlugin) &&
($baseobject->attributesAccess[$infos['mainAttr']]->getUnique() === FALSE)
) {
$baseobject->attributesAccess[$infos['mainAttr']]->setUnique(TRUE);
$baseobject->attributesAccess[$infos['mainAttr']]->setUnique('one');
}
}
......
......@@ -157,7 +157,7 @@ class department extends simplePlugin
$this->attributesAccess['businessCategory']->setChoices($categoriesList);
}
$this->attributesAccess[static::$namingAttr]->setUnique(TRUE);
$this->attributesAccess[static::$namingAttr]->setUnique('one');
}
/* Check values */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment