fixed problem when MessageVariables were no array
This commit is contained in:
parent
5a8b8f07c2
commit
47534ed53a
|
@ -55,9 +55,14 @@ function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariabl
|
||||||
$MessageHeadline = "<h2 " . $class . ">" . $MessageHeadline . "</h2>"; // Format $MessageHeadline
|
$MessageHeadline = "<h2 " . $class . ">" . $MessageHeadline . "</h2>"; // Format $MessageHeadline
|
||||||
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
||||||
$format = "<div " . $class . ">\n<br>\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n<br>\n</div>\n";
|
$format = "<div " . $class . ">\n<br>\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n<br>\n</div>\n";
|
||||||
|
if (is_array($MessageVariables)) {
|
||||||
array_unshift($MessageVariables, $format);
|
array_unshift($MessageVariables, $format);
|
||||||
call_user_func_array('printf',$MessageVariables);
|
call_user_func_array('printf',$MessageVariables);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
printf($format, $MessageVariables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Use the three replace functions on the submitted Text. */
|
/* Use the three replace functions on the submitted Text. */
|
||||||
function parseMessageString($MessageString) {
|
function parseMessageString($MessageString) {
|
||||||
|
|
|
@ -55,9 +55,14 @@ function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariabl
|
||||||
$MessageHeadline = "<h2 " . $class . ">" . $MessageHeadline . "</h2>"; // Format $MessageHeadline
|
$MessageHeadline = "<h2 " . $class . ">" . $MessageHeadline . "</h2>"; // Format $MessageHeadline
|
||||||
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
|
||||||
$format = "<div " . $class . ">\n<br>\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n<br>\n</div>\n";
|
$format = "<div " . $class . ">\n<br>\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n<br>\n</div>\n";
|
||||||
|
if (is_array($MessageVariables)) {
|
||||||
array_unshift($MessageVariables, $format);
|
array_unshift($MessageVariables, $format);
|
||||||
call_user_func_array('printf',$MessageVariables);
|
call_user_func_array('printf',$MessageVariables);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
printf($format, $MessageVariables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Use the three replace functions on the submitted Text. */
|
/* Use the three replace functions on the submitted Text. */
|
||||||
function parseMessageString($MessageString) {
|
function parseMessageString($MessageString) {
|
||||||
|
|
Loading…
Reference in New Issue