Use sm_print_r() only if it exists, so the code can be backported.
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 26 Jul 2003 18:59:54 +0000 (18:59 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 26 Jul 2003 18:59:54 +0000 (18:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5428 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_asearch.php

index 1b4d9e81768ecd7a184f700e71de074c819b5bb1..ecaeb7010c9fd074765ef806f297c372fc65ac6c 100644 (file)
@@ -114,8 +114,16 @@ function asearch_unhtmlentities($string) {
 function s_debug_dump($var_name, $var_var)
 {
        global $imap_asearch_debug_dump;
 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 '<pre>';
+                       echo htmlentities($var_name);
+                       print_r($var_var);
+                       echo '</pre>';
+               }
+       }
 }
 
 /*
 }
 
 /*