Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F6857
FormatJson_loose_typing_fix.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 11:08 PM
2014-11-21 23:08:39 (UTC+0)
Size
641 B
Referenced Files
None
Subscribers
None
FormatJson_loose_typing_fix.patch
View Options
Index: json/FormatJson.php
===================================================================
--- json/FormatJson.php (revision 67579)
+++ json/FormatJson.php (working copy)
@@ -21,11 +21,11 @@
public static function decode( $value, $assoc = false ) {
if ( !function_exists( 'json_decode' ) ) {
- $json = new Services_JSON();
+ if( $assoc )
+ $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
+ else
+ $json = new Services_JSON();
$jsonDec = $json->decode( $value );
- if( $assoc ) {
- $jsonDec = wfObjectToArray( $jsonDec );
- }
return $jsonDec;
} else {
return json_decode( $value, $assoc );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6395
Default Alt Text
FormatJson_loose_typing_fix.patch (641 B)
Attached To
Mode
T25817: wfObjectToArray does not recurse into arrays
Attached
Detach File
Event Timeline
Log In to Comment