The change from null to stdClass() in get_config() was leading to:
1) unit tests not passing.
2) non-equivalent evaluation in conditions (null evals false,
stdClassi() evals true)
if ($localcfg) {
return (object)$localcfg;
} else {
- return new stdClass();
+ return null;
}
} else {
$expectedconfig = new stdClass;
$expectedconfig->configname = 'Other config value';
$this->assertEqual($expectedconfig, get_config('filter_other'));
- $this->assertFalse(get_config('filter_name'));
+ $this->assertNull(get_config('filter_name'));
}
public function test_filter_delete_all_for_context() {