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

Fixes #4529 Fixed fatal error in departement

parent 92c368ba
......@@ -147,11 +147,13 @@ class department extends simplePlugin
$categoriesList = $this->config->get_cfg_value('DepartmentCategories', array());
/* Insert current value to possibilities */
$businessCategory = $this->attributesAccess['businessCategory']->getValue();
if (($businessCategory != "") && !in_array($businessCategory, $categoriesList)) {
$categoriesList[] = $businessCategory;
if (isset($this->attributesAccess['businessCategory'])) {
$businessCategory = $this->attributesAccess['businessCategory']->getValue();
if (($businessCategory != "") && !in_array($businessCategory, $categoriesList)) {
$categoriesList[] = $businessCategory;
}
$this->attributesAccess['businessCategory']->setChoices($categoriesList);
}
$this->attributesAccess['businessCategory']->setChoices($categoriesList);
$this->attributesAccess[$this->getNamingAttr()]->setUnique(TRUE);
}
......
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