Skip to content

Commit

Permalink
MDL-31238 remove now unnecessary null to stdClass conversion for plug…
Browse files Browse the repository at this point in the history
…in settings
  • Loading branch information
skodak authored and stronk7 committed Jan 24, 2012
1 parent 5da7b22 commit d160a5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions lib/enrollib.php
Expand Up @@ -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");
}
}

Expand Down
6 changes: 1 addition & 5 deletions message/lib.php
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit d160a5d

Please sign in to comment.