From fc8fdd5737eb3f6c8db94ff18b852fefa7762fac Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Fri, 4 Oct 2024 20:25:00 +0530 Subject: [PATCH] Added the fix for ticket LDEV-5050 --- .../component/org/lucee/cfml/HelperBase.cfc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/src/main/java/resource/component/org/lucee/cfml/HelperBase.cfc b/core/src/main/java/resource/component/org/lucee/cfml/HelperBase.cfc index 5abae9e88a..7fb97b7977 100755 --- a/core/src/main/java/resource/component/org/lucee/cfml/HelperBase.cfc +++ b/core/src/main/java/resource/component/org/lucee/cfml/HelperBase.cfc @@ -28,6 +28,20 @@ */ public HelperBase function addParam() { ArrayAppend(variables.params,arguments); + variables.params.each( + function(param) { + if (structKeyExists(param, "list") && param.list) { + // Check if the 'value' is empty + if (structKeyExists(param, "value") && trim(param.value) == '') { + var errorMsg = structKeyExists(param, "name") + ? "param [#param.name#] may not be empty" + : "param with list [#param.list#] Value may not be empty"; + + throw(errorMsg, "expression"); + } + } + } + ); return this; }