[Coldbox 4.3.0+188] flash.get with default value throws error - bug

9 views
Skip to first unread message

Harkirat

unread,
Dec 21, 2017, 8:55:45 PM12/21/17
to ColdBox Platform
When I do #flash.get(name="info", default="")# I get an error " info not found in flash scope. Valid keys are ."
This however works #flash.get("info","")#

I believe the default value should kick in if the variable does not exist in flash so this looks like a bug.

Eric Peterson

unread,
Dec 21, 2017, 9:30:17 PM12/21/17
to ColdBox Platform
The argument name is `defaultValue` instead of `default`. Blame ACF. 😉

Harkirat Singh

unread,
Dec 22, 2017, 11:06:55 AM12/22/17
to col...@googlegroups.com
It looks like the Coldbox document needs to be updated then as it is using ‘default' at https://coldbox.ortusbooks.com/content/full/flash_ram/using_flash_ram.html#more-examples


On Dec 21, 2017, at 9:19 PM, Eric Peterson <er...@elpete.com> wrote:

The argument name is `defaultValue` instead of `default`. Blame ACF. 😉

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to a topic in the Google Groups "ColdBox Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/coldbox/YBc--UwRPTc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/8a3cb810-b5ec-4017-9404-7bd457e31529%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Peterson

unread,
Dec 22, 2017, 11:08:07 AM12/22/17
to col...@googlegroups.com
Thanks!  You can do a pull request by clicking on the "Edit this Page" at the top or by going straight to this link: https://github.com/ortus-docs/coldbox-docs/blob/master/full/flash_ram/using_flash_ram.md

Harkirat Singh

unread,
Dec 22, 2017, 11:16:04 AM12/22/17
to col...@googlegroups.com
Created the pull request 👍🏻 Thanks for your help! 

On Dec 22, 2017, at 11:08 AM, Eric Peterson <er...@elpete.com> wrote:

Thanks!  You can do a pull request by clicking on the "Edit this Page" at the top or by going straight to this link: https://github.com/ortus-docs/coldbox-docs/blob/master/full/flash_ram/using_flash_ram.md

-- 
-- 
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
--- 
You received this message because you are subscribed to a topic in the Google Groups "ColdBox Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/coldbox/YBc--UwRPTc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages