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;