Permalink
Browse files

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

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

0 comments on commit d160a5d

Please sign in to comment.