]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for warnings
authortoyomoyo <toyomoyo>
Thu, 12 Oct 2006 08:26:19 +0000 (08:26 +0000)
committertoyomoyo <toyomoyo>
Thu, 12 Oct 2006 08:26:19 +0000 (08:26 +0000)
mod/glossary/restorelib.php

index 469b3fff9a707d10b46b6c897e1adba13d2a0129..134426f48cf453426760b75b163b8210b8535beb 100644 (file)
         $status = true;
 
         //Get the entries array
-        $entries = $info['MOD']['#']['ENTRIES']['0']['#']['ENTRY'];
+        $entries = isset($info['MOD']['#']['ENTRIES']['0']['#']['ENTRY'])?$info['MOD']['#']['ENTRIES']['0']['#']['ENTRY']:array();
 
         //Iterate over entries
         for($i = 0; $i < sizeof($entries); $i++) {
         $status = true;
 
         //Get the categories array
-        $categories = $info['MOD']['#']['CATEGORIES']['0']['#']['CATEGORY'];
+        $categories = isset($info['MOD']['#']['CATEGORIES']['0']['#']['CATEGORY'])?$info['MOD']['#']['CATEGORIES']['0']['#']['CATEGORY']:array();
 
         //Iterate over categories
         for($i = 0; $i < sizeof($categories); $i++) {