From 8fa53742d7d08d32bd97aa32f1781b2fddb8ba80 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 8 Sep 2023 16:41:33 +0200 Subject: [PATCH] LDEV-3171 - make sure we do no set collection.key as values --- .../main/java/lucee/runtime/functions/arrays/ArrayToStruct.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java b/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java index 510442f379..188ac49d16 100644 --- a/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java +++ b/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java @@ -44,7 +44,7 @@ public static Struct call(PageContext pc, Array arr, boolean valueAsKey) throws Entry e; while (it.hasNext()) { e = it.next(); - if (valueAsKey) sct.set(Caster.toKey(e.getValue()), e.getKey().getString()); + if (valueAsKey) sct.set(Caster.toKey(e.getValue()), Caster.toDouble(e.getKey())); else sct.set(e.getKey(), e.getValue()); } return sct;