Bug 36486 - CategoryTree: get_object_vars() expects parameter 1 to be object, null given

Change-Id: Ibdf188724bee192dceb96d7e55ebe3d1e106facf
This commit is contained in:
Reedy 2012-05-09 20:01:08 +01:00
parent f7dc974aa2
commit 427e6849ae

View file

@ -267,6 +267,9 @@ class CategoryTree {
$opt = array( "mode" => $options );
} elseif ( $enc == 'json' ) {
$opt = FormatJson::decode( $options );
if ( !$opt ) {
throw new MWException( 'JSON cannot decode CategoryTree options' );
}
$opt = get_object_vars( $opt );
} else {
throw new MWException( 'Unknown encoding for CategoryTree options: ' . $enc );