Skip to content

Commit 5a81c83

Browse files
authored
Fix(Fields): fix default value format for multiple dropdown (GLPIObject) (#1089)
1 parent e4c7338 commit 5a81c83

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Fixed
1111

12+
- Fix default value format for multiple dropdown (GLPIObject)
1213
- Increased the maximum length of the language column to support longer locale codes
1314

1415
## [1.21.24] - 2025-10-10

inc/field.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public function prepareInputForAdd($input)
249249
$input['name'] = $this->prepareName($input);
250250

251251
if ($input['multiple'] ?? false) {
252-
$input['default_value'] = json_encode($input['default_value'] ?? []);
252+
$input['default_value'] = json_encode($input['default_value'] ?: []);
253253
}
254254

255255
//reject adding when field name is too long for mysql

0 commit comments

Comments
 (0)