From 85bf4c41c5ee2f315ec938b8d7cb7eabba60e60a Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 8 Sep 2023 16:35:39 +0200 Subject: [PATCH] LDEV-3171 - make sure we do no set collection.key as values --- .../java/lucee/runtime/functions/arrays/ArrayToStruct.java | 5 ++--- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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 3779f96852..510442f379 100644 --- a/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java +++ b/core/src/main/java/lucee/runtime/functions/arrays/ArrayToStruct.java @@ -30,10 +30,9 @@ import lucee.runtime.ext.function.BIF; import lucee.runtime.op.Caster; import lucee.runtime.type.Array; -import lucee.runtime.type.KeyImpl; +import lucee.runtime.type.Collection.Key; import lucee.runtime.type.Struct; import lucee.runtime.type.StructImpl; -import lucee.runtime.type.Collection.Key; public final class ArrayToStruct extends BIF { @@ -45,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()); + if (valueAsKey) sct.set(Caster.toKey(e.getValue()), e.getKey().getString()); else sct.set(e.getKey(), e.getValue()); } return sct; diff --git a/loader/build.xml b/loader/build.xml index f3e5187d9d..397ccad861 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 82b9c81185..3b02df9fd3 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.0.0.536-SNAPSHOT + 6.0.0.537-SNAPSHOT jar Lucee Loader Build