From: Brion Vibber Date: Mon, 20 Aug 2007 13:46:08 +0000 (+0000) Subject: aaand restore behavior from prior to r24882 on expected input X-Git-Tag: 1.31.0-rc.0~51720 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=07aeee4da8cbb4569c48a45f167e75d55401adc1;p=lhc%2Fweb%2Fwiklou.git aaand restore behavior from prior to r24882 on expected input --- 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; } /**