diff options
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 10 |
1 files changed, 7 insertions, 3 deletions
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; |