PHP Sucks. Having a value of 0 was making $value appear as false, so you couldn't...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 20 Aug 2008 12:30:31 +0000 (12:30 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 20 Aug 2008 12:30:31 +0000 (12:30 +0000)
includes/Xml.php

index 1551878..05e93bc 100644 (file)
@@ -674,7 +674,8 @@ class XmlSelect {
        }
 
        public function addOption( $name, $value = false ) {
-               $value = $value ? $value : $name;
+               // Stab stab stab
+               $value = ($value !== false) ? $value : $name;
                $this->options[] = Xml::option( $name, $value, $value === $this->default );
        }