Revert r23471, r23474: restore Special:Version to working, non-ugly state
[lhc/web/wiklou.git] / includes / SpecialVersion.php
index 1aee8cd..0b63393 100644 (file)
@@ -250,7 +250,10 @@ class SpecialVersion {
         * @return mixed
         */
        function arrayToString( $list ) {
-               if ( ! is_array( $list ) ) {
+               if( is_object( $list ) ) {
+                       $class = get_class( $list );
+                       return "($class)";
+               } elseif ( ! is_array( $list ) ) {
                        return $list;
                } else {
                        $class = get_class( $list[0] );
@@ -282,7 +285,10 @@ class SpecialVersion {
                                return false;
                        }
 
-                       $xml = simplexml_load_file( $entries, "SimpleXMLElement", LIBXML_NOWARNING );
+                       // SimpleXml whines about the xmlns...
+                       wfSuppressWarnings();
+                       $xml = simplexml_load_file( $entries );
+                       wfRestoreWarnings();
 
                        if( $xml ) {
                                foreach( $xml->entry as $entry ) {