diff --git a/CHANGELOG.md b/CHANGELOG.md index 02799630..52ff0022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fix default value format for multiple dropdown (GLPIObject) +- Fix bad SQL query for `GenericObject` - Fixed a bug that prevented the creation of additional field data for objects - Hide config menu if user does not have read permission diff --git a/inc/field.class.php b/inc/field.class.php index efaa97a6..7c7a2cf2 100644 --- a/inc/field.class.php +++ b/inc/field.class.php @@ -252,7 +252,7 @@ public function prepareInputForAdd($input) $input['name'] = $this->prepareName($input); if ($input['multiple'] ?? false) { - $input['default_value'] = json_encode($input['default_value'] ?? []); + $input['default_value'] = json_encode($input['default_value'] ?: []); } //reject adding when field name is too long for mysql