Index: trunk/phase3/includes/Xml.php |
— | — | @@ -41,15 +41,12 @@ |
42 | 42 | * @param $attribs Array of attributes for an XML element |
43 | 43 | */ |
44 | 44 | private static function expandAttributes( $attribs ) { |
45 | | - if( is_null( $attribs ) ) { |
46 | | - return null; |
47 | | - } else { |
48 | | - $out = ''; |
49 | | - foreach( $attribs as $name => $val ) { |
50 | | - $out .= ' ' . $name . '="' . Sanitizer::encodeAttribute( $val ) . '"'; |
51 | | - } |
52 | | - return $out; |
| 45 | + $out = ''; |
| 46 | + if( is_array( $attribs ) ) { |
| 47 | + foreach( $attribs as $name => $val ) |
| 48 | + $out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"'; |
53 | 49 | } |
| 50 | + return $out; |
54 | 51 | } |
55 | 52 | |
56 | 53 | /** |