Strict type checking, otherwise can't set a default value of '0'.
authorHappy-melon <happy-melon@users.mediawiki.org>
Sat, 13 Mar 2010 16:11:36 +0000 (16:11 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sat, 13 Mar 2010 16:11:36 +0000 (16:11 +0000)
includes/Xml.php

index cf3f2ab..eddf0af 100644 (file)
@@ -744,7 +744,7 @@ class XmlSelect {
        public function __construct( $name = false, $id = false, $default = false ) {
                if ( $name ) $this->setAttribute( 'name', $name );
                if ( $id ) $this->setAttribute( 'id', $id );
-               if ( $default ) $this->default = $default;
+               if ( $default !== false ) $this->default = $default;
        }
 
        public function setDefault( $default ) {