diff --git a/CHANGELOG.md b/CHANGELOG.md index 6076b750..076a6f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix text area fields size and alignment - Optimize container loading when there are a large number of entities - Adding a verification in refreshContainer function for obj value which can be an empty string instead of an array +- Fix refreshContainer crash when a field is serialized both as a scalar and as an array ## [1.24.0] - 2026-04-16 diff --git a/inc/field.class.php b/inc/field.class.php index 44bf2cd8..7f47d65b 100644 --- a/inc/field.class.php +++ b/inc/field.class.php @@ -1013,6 +1013,8 @@ function(obj, item) { var name = multiple_matches[1]; if (!(name in obj) || obj[name] == "") { obj[name] = []; + } else if (!Array.isArray(obj[name])) { + obj[name] = [obj[name]]; } obj[name].push(item.value); } else {