diff --git a/includes/smarty.php b/includes/smarty.php index 0fd112e..e076990 100644 --- a/includes/smarty.php +++ b/includes/smarty.php @@ -194,6 +194,14 @@ $ajax=false; function fatal_error($error) { global $smarty, $ajax, $api_mode; + // If more than one arguments passed, format error message using sprintf + if (func_num_args() > 1) { + $error = call_user_func_array( + 'sprintf', + array_merge(array($error), array_slice(func_get_args(), 1)) + ); + } + if (php_sapi_name() == "cli") die("FATAL ERROR : $error\n");