MDL-33294 - block_blog_recent: fix E_STRICT error
authorDan Poltawski <dan@moodle.com>
Sat, 16 Jun 2012 04:46:07 +0000 (12:46 +0800)
committerDan Poltawski <dan@moodle.com>
Sat, 16 Jun 2012 04:46:07 +0000 (12:46 +0800)
Default object from empty value

blocks/blog_recent/block_blog_recent.php

index 20313b6..b3d564f 100644 (file)
@@ -69,6 +69,10 @@ class block_blog_recent extends block_base {
         require_once($CFG->dirroot .'/blog/lib.php');
         require_once($CFG->dirroot .'/blog/locallib.php');
 
+        if (empty($this->config)) {
+            $this->config = new stdClass();
+        }
+
         if (empty($this->config->recentbloginterval)) {
             $this->config->recentbloginterval = 8400;
         }