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:
9e61d94
)
Simplify $assoc check
author
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 20 Dec 2011 20:15:42 +0000
(20:15 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 20 Dec 2011 20:15:42 +0000
(20:15 +0000)
includes/json/FormatJson.php
patch
|
blob
|
history
diff --git
a/includes/json/FormatJson.php
b/includes/json/FormatJson.php
index
0f5f7d5
..
f7373e4
100644
(file)
--- a/
includes/json/FormatJson.php
+++ b/
includes/json/FormatJson.php
@@
-54,10
+54,8
@@
class FormatJson {
*/
public static function decode( $value, $assoc = false ) {
if ( !function_exists( 'json_decode' ) ) {
- if( $assoc )
- $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
- else
- $json = new Services_JSON();
+ $json = $assoc ? new Services_JSON( SERVICES_JSON_LOOSE_TYPE ) :
+ new Services_JSON();
$jsonDec = $json->decode( $value );
return $jsonDec;
} else {