Bug in AbstractFlashScope resetting inflateToRC and inflateToPRC properties

I’ve discovered a bug in the inflateFlash() method of AbstractFlashScope.cfc where it resets a variable’s inflateToRC and inflateToPRC properties back to their default values when the flash RAM is inflated. Due to the way inflateFlash() works, this bug only really affects variables with autoPurge=false (or those that have been “kept” for another request cycle.

The bug is on line 110 of AbstractFlashScope.cfc. Here is the original line:

put(name=key,value=flash[key].content,keep=keep,autoPurge=flash[key].autoPurge);

As you can see, it doesn’t specify values for the “inflate” arguments so the default values are used. This fixes the issue:

put(name=key, value=flash[key].content, keep=keep, inflateToRC=flash[key].inflateToRC, inflateToPRC=flash[key].inflateToPRC, autoPurge=flash[key].autoPurge);

thanks fixed and just in time for 3.
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com