Throw an exception for invalid data in expandAttributes() so we get a backtrace and...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 20 Aug 2007 13:43:14 +0000 (13:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 20 Aug 2007 13:43:14 +0000 (13:43 +0000)
includes/Xml.php

index e0548ed..2082d68 100644 (file)
@@ -45,6 +45,8 @@ class Xml {
                if( is_array( $attribs ) ) {
                        foreach( $attribs as $name => $val )
                                $out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"';
+               } else {
+                       throw new MWException( 'Expected attribute array, got something else in ' . __METHOD__ );
                }
                return $out;
        }