Permalink
Browse files

MDL-31238 remove now unnecessary null to stdClass conversion for plug…

…in settings
  • Loading branch information...
skodak committed Jan 21, 2012
1 parent 057d39b commit 68d4c5bc1fcd4939edf7e46487635ca46028acfd
Showing with 2 additions and 9 deletions.
  1. +1 −4 lib/enrollib.php
  2. +1 −5 message/lib.php
View
@@ -1039,10 +1039,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");
}
}
View
@@ -2347,11 +2347,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');
}
/**

0 comments on commit 68d4c5b

Please sign in to comment.