Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…in settings
  • Loading branch information...
commit d160a5db4a6c248072ea205bdeed1c4ac400fdae 1 parent 5da7b22
Petr Skoda skodak authored stronk7 committed
Showing with 2 additions and 9 deletions.
  1. +1 −4 lib/enrollib.php
  2. +1 −5 message/lib.php
5 lib/enrollib.php
View
@@ -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");
}
}
6 message/lib.php
View
@@ -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');
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.