diff --git a/inc/fields/dropdownfield.class.php b/inc/fields/dropdownfield.class.php index e192e1bb8..9b166d5b5 100644 --- a/inc/fields/dropdownfield.class.php +++ b/inc/fields/dropdownfield.class.php @@ -230,7 +230,11 @@ public static function getName() { public function isValid() { // If the field is required it can't be empty $itemtype = json_decode($this->fields['values'], true); - $itemtype = $itemtype['itemtype']; + if ($itemtype === null) { + $itemtype = $this->fields['values']; + } else { + $itemtype = $itemtype['itemtype']; + } $dropdown = new $itemtype(); if ($this->isRequired() && $dropdown->isNewId($this->value)) { Session::addMessageAfterRedirect(