diff --git a/CHANGELOG.md b/CHANGELOG.md index 997e5a1c..d19aa644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,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 {