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

This commit is contained in:
Hashar 2012-05-17 04:42:31 +00:00 committed by Gerrit Code Review
commit 85bf3865af

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 );