From f64a2f4d00b801408b558917bae8f6a428931fe7 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 18 Oct 2007 05:52:06 +0000 Subject: fixed admin prefs, flushed out localplay stuff, tweaked filters on browse --- lib/ui.lib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/ui.lib.php') diff --git a/lib/ui.lib.php b/lib/ui.lib.php index d785431f..cbfb0fc1 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -1004,8 +1004,12 @@ function get_user_icon($name,$title='',$id='') { * primarly by the ajax mojo */ function xml_from_array($array,$callback=0,$type='') { + + // If we weren't passed an array then return a blank string + if (!is_array($array)) { return ''; } + + // The type is used for the different XML docs we pass switch ($type) { - case 'itunes': foreach ($array as $key=>$value) { if (is_array($value)) { @@ -1025,7 +1029,7 @@ function xml_from_array($array,$callback=0,$type='') { } } - } + } // end foreach return $string; break; @@ -1046,7 +1050,7 @@ function xml_from_array($array,$callback=0,$type='') { } } - } + } // end foreach return $string; break; -- cgit