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

blocks/blog_tags/block_blog_tags.php

index c3fa8d8..c84f9d2 100644 (file)
@@ -93,6 +93,10 @@ class block_blog_tags extends block_base {
         // require the libs and do the work
         require_once($CFG->dirroot .'/blog/lib.php');
 
+        if (empty($this->config)) {
+            $this->config = new stdClass();
+        }
+
         if (empty($this->config->timewithin)) {
             $this->config->timewithin = BLOCK_BLOG_TAGS_DEFAULTTIMEWITHIN;
         }