mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-15 03:43:55 +00:00
Bug 36486 - CategoryTree: get_object_vars() expects parameter 1 to be object, null given
Change-Id: Ibdf188724bee192dceb96d7e55ebe3d1e106facf
This commit is contained in:
parent
f7dc974aa2
commit
427e6849ae
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue