Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDEV-5027 - allow empty default in updateCacheConnection() #2413

Open
wants to merge 1 commit into
base: 6.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ component {
custom=isNull(arguments.custom) || isEmpty(arguments.custom) ? isEmpty(existing.custom) ? {} : existing.custom : arguments.custom
bundleName=isNull(arguments.bundleName) || isEmpty(arguments.bundleName) ? existing.bundleName ?: "" : arguments.bundleName
bundleVersion=isNull(arguments.bundleVersion) || isEmpty(arguments.bundleVersion) ? existing.bundleVersion ?: "" : arguments.bundleVersion
default=isNull(arguments.default) || isEmpty(arguments.default) ? existing.default ?: false : arguments.default
default=isNull(arguments.default) || isEmpty(arguments.default) ? existing.default ?: "" : arguments.default
readonly=isNull(arguments.readonly) || isEmpty(arguments.readonly) ? existing.readonly ?: false : arguments.readonly
storage=isNull(arguments.storage) || isEmpty(arguments.storage) ? existing.storage ?: false : arguments.storage

Expand Down
31 changes: 31 additions & 0 deletions test/tickets/LDEV5027.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
component extends="org.lucee.cfml.test.LuceeTestCase" {

function beforeAll() {
variables.cacheName="Test"&ListFirst(ListLast(getCurrentTemplatePath(),"\/"),".");
}

function run( testResults, testBox ) {
describe( "Testcase for LDEV-5027", function() {
it( title="Allow empty default in updateCacheConnection()", body=function(){
admin
action="updateCacheConnection"
type="web"
password="#request.webadminpassword#"
name="#cacheName#"
class="lucee.runtime.cache.ram.RamCache"
storage="false"
default=""
custom="#{timeToLiveSeconds:86400
,timeToIdleSeconds:86400}#";
});
});
}

function afterAll() {
admin
action="removeCacheConnection"
type="web"
password="#request.webadminpassword#"
name="#cacheName#";
}
}
Loading