diff --git a/lib/enrollib.php b/lib/enrollib.php index 991fb1c822187..0b5e701d13ab4 100644 --- a/lib/enrollib.php +++ b/lib/enrollib.php @@ -950,10 +950,7 @@ public function get_description_text($instance) { protected function load_config() { if (!isset($this->config)) { $name = $this->get_name(); - if (!$config = get_config("enrol_$name")) { - $config = new stdClass(); - } - $this->config = $config; + $this->config = get_config("enrol_$name"); } } diff --git a/message/lib.php b/message/lib.php index 656326bc90b2c..181410461d15a 100644 --- a/message/lib.php +++ b/message/lib.php @@ -2345,11 +2345,7 @@ function get_message_processor($type) { * @return object $processors object containing information on message processors */ function get_message_output_default_preferences() { - $preferences = get_config('message'); - if (!$preferences) { - $preferences = new stdClass(); - } - return $preferences; + return get_config('message'); } /**