Merge branch 'w51_MDL-37128_m23_rssrestore' of git://github.com/skodak/moodle into...
authorDan Poltawski <dan@moodle.com>
Mon, 7 Jan 2013 05:57:10 +0000 (13:57 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 7 Jan 2013 05:57:10 +0000 (13:57 +0800)
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