From e686494fbc7e55c46b0f365a188c1c42ba7cd193 Mon Sep 17 00:00:00 2001 From: Mark Nielsen Date: Wed, 7 May 2014 12:38:32 -0700 Subject: [PATCH] MDL-44630: Fixing PHP foreach warnings --- backup/converter/moodle1/lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backup/converter/moodle1/lib.php b/backup/converter/moodle1/lib.php index 5b0ae4c9beb..2f8232a9336 100644 --- a/backup/converter/moodle1/lib.php +++ b/backup/converter/moodle1/lib.php @@ -466,6 +466,9 @@ class moodle1_converter extends base_converter { if (empty($record)) { throw new moodle1_convert_empty_storage_exception('required_not_stashed_data', array($stashname, $itemid)); } else { + if (empty($record->info)) { + return array(); + } return $record->info; } }