Small bug in plugin MessageBox

Hi guys,

As I was writing the prependArray function for my previous email regarding the feature request, I noticed a bug in the MessageBox plugin.
If you look at the appendArray method:

var currentMessage = ""; var newMessage = "";

// Do we have a message?
if( isEmpty() ){
// Set default message
// Get Current Message
currentMessage = getMessage();
// Append
// Set it back

You will see that when there is no message, the message type is set to ‘information’ but the setMessage method will only accept ‘error’, ‘warning’, or ‘info’ as possible values:

// check message type
if( refindnocase("(error|warning|info)", trim(arguments.type)) ){

} else {
$throw(“The message type is invalid: #arguments.type#”,“Valid types are info,error or warning”,“MessageBox.InvalidMessageType”);

Also note here again that for the appendArray method, the ArrayPrePend function is used with the arguments in reversed order… Suggest for readability to use ArrayAppend instead with the arguments in the correct order.


Hi Guys,

The same is true for methods:

info() and append().


Hi Guys,

I have altered the MessageBox plugin and created a custom plugin as an extension of the core plugin.

It is attached to this email, I thought it would be nice for Luis to use as a guide when updating the core plugin.
(I also added my feature request)


MessageBox.cfc (6.17 KB)

Hi Guys,

I created a bug myself in the previous file…
I see now why ArrayPrePend was used in the appendArray :). It expects a string as the second argument.

Updated the MessageBox plugin as per attached.


MessageBox.cfc (6.17 KB)

Tom this is great, is there a way to send me this via as a pull request from git?

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Hi Luis,

I sure can. Is there any procedure I need to follow?

Tom Van Schoor


Get a github account
Fork coldbox
Then setup a local dev for coldbox usin your fork
Make sure you work on the development branch
Do your changes
Commit and push to your repo
Via github do a send pull request
That’s it