r24948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24947‎ | r24948 | r24949 >
Date:13:46, 20 August 2007
Author:brion
Status:old
Tags:
Comment:
aaand restore behavior from prior to r24882 on expected input
Modified paths:
  • /trunk/phase3/includes/Xml.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Xml.php
@@ -42,13 +42,15 @@
4343 */
4444 private static function expandAttributes( $attribs ) {
4545 $out = '';
46 - if( is_array( $attribs ) ) {
 46+ if( is_null( $attribs ) ) {
 47+ return null;
 48+ } elseif( is_array( $attribs ) ) {
4749 foreach( $attribs as $name => $val )
4850 $out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"';
 51+ return $out;
4952 } else {
5053 throw new MWException( 'Expected attribute array, got something else in ' . __METHOD__ );
5154 }
52 - return $out;
5355 }
5456
5557 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r25016Merged revisions 24866-25015 via svnmerge from...david23:06, 21 August 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r24882Make Xml::expandAttributes() a bit more robust against non-array arguments; p...robchurch17:06, 17 August 2007

Status & tagging log