mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-15 20:09:58 +00:00
Merge "Bug 36486 - CategoryTree: get_object_vars() expects parameter 1 to be object, null given"
This commit is contained in:
commit
85bf3865af
|
@ -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