Skip to content

Fix module settings param for Lucee 6 - COLDBOX-1385#650

Open
michaelborn wants to merge 1 commit intoColdBox:developmentfrom
michaelborn:patch/lucee-6-param-syntax
Open

Fix module settings param for Lucee 6 - COLDBOX-1385#650
michaelborn wants to merge 1 commit intoColdBox:developmentfrom
michaelborn:patch/lucee-6-param-syntax

Conversation

@michaelborn
Copy link
Copy Markdown
Contributor

Description

Lucee 6.2.5+48 does not like this syntax in coldbox's ModuleService:

param name="globalModuleSettings[ mConfig.modelNamespace ]" default="#structNew()#";

Jira Issues

https://ortussolutions.atlassian.net/browse/COLDBOX-1385

Type of change

Please delete options that are not relevant.

  • Bug Fix

Checklist

  • My code follows the style guidelines of this project cfformat
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a Lucee 6 parsing incompatibility in ModuleService when ensuring a nested moduleSettings struct exists for a module namespace.

Changes:

  • Replaces param name="globalModuleSettings[ ... ]" usage with an explicit keyExists() check and initialization.
  • Preserves the existing behavior of merging global module settings into module config settings.

.getSetting( "ColdBoxConfig" )
.getPropertyMixin( "moduleSettings", "variables", {} );
param name="globalModuleSettings[ mConfig.modelNamespace ]" default="#structNew()#";
if( !globalModuleSettings.keyExists( mConfig.modelNamespace ) ) {
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing around the if condition is inconsistent with the rest of this file (which uses if ( ... )). Please format this as if ( ... ) for consistency/readability.

Suggested change
if( !globalModuleSettings.keyExists( mConfig.modelNamespace ) ) {
if ( !globalModuleSettings.keyExists( mConfig.modelNamespace ) ) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants