dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c71e58f
)
r52070 breaks the use of optgroups etc: array(...) is cast to 'Array'. Need to only...
author
Happy-melon
<happy-melon@users.mediawiki.org>
Sat, 18 Dec 2010 16:25:14 +0000
(16:25 +0000)
committer
Happy-melon
<happy-melon@users.mediawiki.org>
Sat, 18 Dec 2010 16:25:14 +0000
(16:25 +0000)
includes/HTMLForm.php
patch
|
blob
|
history
diff --git
a/includes/HTMLForm.php
b/includes/HTMLForm.php
index
0952ebf
..
fbb17d4
100644
(file)
--- a/
includes/HTMLForm.php
+++ b/
includes/HTMLForm.php
@@
-1222,7
+1222,10
@@
class HTMLSelectField extends HTMLFormField {
# If one of the options' 'name' is int(0), it is automatically selected.
# because PHP sucks and things int(0) == 'some string'.
# Working around this by forcing all of them to strings.
- $options = array_map( 'strval', $this->mParams['options'] );
+ $options = array_map(
+ create_function('$opt', 'return is_int($opt) ? strval($opt) : $opt;'),
+ $this->mParams['options']
+ );
if ( !empty( $this->mParams['disabled'] ) ) {
$select->setAttribute( 'disabled', 'disabled' );