X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fstrings.php;h=af51b98745589b3c43d8acdae6e71520e65012ce;hp=ee4fa5965a53316537ec4db4a75824337d442531;hb=7fe09a30292a999b7710c89b4901e4f0ca1872ae;hpb=b2306cbe954f6da0a5d10971f05d5bacc298a4ab diff --git a/functions/strings.php b/functions/strings.php index ee4fa596..af51b987 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -439,15 +439,18 @@ function makeComposeLink($url, $text = null) } /** -* sm_print_r($some_variable); +* sm_print_r($some_variable, [$some_other_variable [, ...]]); * Debugging function - does the same as print_r, but makes sure special * characters are converted to htmlentities first. This will allow * values like to be displayed. * The output is wrapped in
 and 
tags. */ -function sm_print_r($var) { +function sm_print_r() { ob_start(); // Buffer output - print_r($var); + foreach(func_get_args() as $var) { + print_r($var); + echo "\n"; + } $buffer = ob_get_contents(); // Grab the print_r output ob_end_clean(); // Silently discard the output & stop buffering print "
";