From e75a08f1bc3455d8fd4ba8f7c1a8b8e22ad22249 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Wed, 20 Aug 2008 12:30:31 +0000 Subject: [PATCH] PHP Sucks. Having a value of 0 was making $value appear as false, so you couldn't set a value when adding an option. Fixed this up with a strict check. --- includes/Xml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Xml.php b/includes/Xml.php index 1551878518..05e93bc3eb 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -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 ); } -- 2.20.1