MDL-37128 fix E_STRICT rss restore issue
authorPetr Škoda <commits@skodak.org>
Thu, 27 Dec 2012 12:39:09 +0000 (13:39 +0100)
committerPetr Škoda <commits@skodak.org>
Thu, 27 Dec 2012 12:41:20 +0000 (13:41 +0100)
blocks/rss_client/backup/moodle2/restore_rss_client_stepslib.php

index 8e28ac2..c23d7b9 100644 (file)
@@ -78,6 +78,9 @@ class restore_rss_client_block_structure_step extends restore_structure_step {
         $configdata = $DB->get_field('block_instances', 'configdata', array('id' => $this->task->get_blockid()));
         // Extract configdata
         $config = unserialize(base64_decode($configdata));
+        if (empty($config)) {
+            $config = new stdClass();
+        }
         // Set array of used rss feeds
         $config->rssid = $feedsarr;
         // Serialize back the configdata