From 07aeee4da8cbb4569c48a45f167e75d55401adc1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 20 Aug 2007 13:46:08 +0000 Subject: [PATCH] aaand restore behavior from prior to r24882 on expected input --- includes/Xml.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Xml.php b/includes/Xml.php index 2082d68322..d7261a1f19 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -42,13 +42,15 @@ class Xml { */ private static function expandAttributes( $attribs ) { $out = ''; - if( is_array( $attribs ) ) { + if( is_null( $attribs ) ) { + return null; + } elseif( is_array( $attribs ) ) { foreach( $attribs as $name => $val ) $out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"'; + return $out; } else { throw new MWException( 'Expected attribute array, got something else in ' . __METHOD__ ); } - return $out; } /** -- 2.20.1