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:
c7f5348
)
Fix warning in PHP 5.1 when feeding Title objects to wfArrayToCGI(). Also enforce...
author
Roan Kattouw
<catrope@users.mediawiki.org>
Sun, 12 Apr 2009 17:38:41 +0000
(17:38 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Sun, 12 Apr 2009 17:38:41 +0000
(17:38 +0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
2ca81c9
..
d69c289
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-1230,18
+1230,18
@@
function wfArrayToCGI( $array1, $array2 = NULL )
if ( '' != $cgi ) {
$cgi .= '&';
}
- if(is_array($value))
- {
+ if ( is_array( $value ) ) {
$firstTime = true;
- foreach($value as $v)
- {
- $cgi .= ($firstTime ? '' : '&') .
+ foreach ( $value as $v ) {
+ $cgi .= ( $firstTime ? '' : '&') .
urlencode( $key . '[]' ) . '=' .
urlencode( $v );
$firstTime = false;
}
- }
- else
+ } else {
+ if ( is_object( $value ) ) {
+ $value = $value->__toString();
+ }
$cgi .= urlencode( $key ) . '=' .
urlencode( $value );
}