Skip to content

Commit

Permalink
Change default informMessage parameters to array()
Browse files Browse the repository at this point in the history
The function informMessage expects parameter $Options to be an array, but the default has been a string. That string has always had to be converted to an array when the function has been called with no options.
  • Loading branch information
R-J committed Aug 3, 2015
1 parent 26551a6 commit 632d7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/class.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ public function image($Img = false) {
* @param string $Message The message to be displayed.
* @param mixed $Options An array of options for the message. If not an array, it is assumed to be a string of CSS classes to apply to the message.
*/
public function informMessage($Message, $Options = 'Dismissable AutoDismiss') {
public function informMessage($Message, $Options = array('CssClass' => 'Dismissable AutoDismiss')) {
// If $Options isn't an array of options, accept it as a string of css classes to be assigned to the message.
if (!is_array($Options)) {
$Options = array('CssClass' => $Options);
Expand Down

0 comments on commit 632d7d0

Please sign in to comment.