Explorar o código

Use sm_print_r() only if it exists, so the code can be backported.

alex-brainstorm %!s(int64=22) %!d(string=hai) anos
pai
achega
24f05a49bc
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      functions/imap_asearch.php

+ 10 - 2
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 '<pre>';
+			echo htmlentities($var_name);
+			print_r($var_var);
+			echo '</pre>';
+		}
+	}
 }
 
 /*