From f9fb0d388d234a1b02d0ac33ffee4c287d10ef2b Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Sat, 26 Jul 2003 18:59:54 +0000 Subject: [PATCH] Use sm_print_r() only if it exists, so the code can be backported. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5428 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_asearch.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index 1b4d9e81..ecaeb701 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -114,8 +114,16 @@ function asearch_unhtmlentities($string) { function s_debug_dump($var_name, $var_var) { global $imap_asearch_debug_dump; - if ($imap_asearch_debug_dump) - sm_print_r($var_name, $var_var); + if ($imap_asearch_debug_dump) { + if (function_exists('sm_print_r')) + sm_print_r($var_name, $var_var); //Better be the 'varargs' version ;) + else { + echo '
';
+			echo htmlentities($var_name);
+			print_r($var_var);
+			echo '
'; + } + } } /* -- 2.25.1