PHP's array + operator doesn't overwrite items from the left side when
keys conflict. Switch to array_merge() here, which acts as expected.
* Added redirect to section feature. Use it wisely.
* Added a configuration variable allowing the "break out of framesets" feature
to be switched on and off ($wgBreakFrames). Off by default.
+* Allow Xml::check() $attribs parameter to override 'value' attribute
== Languages updated ==
* @return string HTML
*/
public static function check( $name, $checked=false, $attribs=array() ) {
- return self::element( 'input', array(
- 'name' => $name,
- 'type' => 'checkbox',
- 'value' => 1 ) + self::attrib( 'checked', $checked ) + $attribs );
+ return self::element( 'input', array_merge(
+ array(
+ 'name' => $name,
+ 'type' => 'checkbox',
+ 'value' => 1 ),
+ self::attrib( 'checked', $checked ),
+ $attribs ) );
}
/**