From 689b19297f68002b3b1957d27b8ae3fc78d69ffd Mon Sep 17 00:00:00 2001 From: vyshane Date: Wed, 20 Sep 2006 02:47:57 +0000 Subject: [PATCH] Fixed notice --- mod/forum/restorelib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/forum/restorelib.php b/mod/forum/restorelib.php index c43b7b9ef92..a1401889878 100644 --- a/mod/forum/restorelib.php +++ b/mod/forum/restorelib.php @@ -265,7 +265,12 @@ $status = true; //Get the discussions array - $discussions = $info['MOD']['#']['DISCUSSIONS']['0']['#']['DISCUSSION']; + $discussions = array(); + + if (!empty($info['MOD']['#']['DISCUSSIONS']['0']['#']['DISCUSSION'])) { + $discussions = $info['MOD']['#']['DISCUSSIONS']['0']['#']['DISCUSSION']; + } + //First, we check that "course_id" folder exists and create is as necessary in CFG->dataroot $dest_dir = $CFG->dataroot."/".$restore->course_id; check_dir_exists($dest_dir,true);