From 0beabf4898c656daddab9525bf5a2bdbb54a3d8e Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 3 Mar 2006 22:26:22 +0000 Subject: [PATCH] fixed NULL in foreach warning --- backup/restore_check.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backup/restore_check.html b/backup/restore_check.html index 26ccfb115f6..1461f729ef3 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -43,6 +43,9 @@ $var = "restore_user_info_".$modname; $$var = optional_param( $var,0); $instances = $info->mods[$mod->name]->instances; + if ($instances === NULL) { + continue; + } foreach ($instances as $instance) { $var = 'restore_'.$modname.'_instance_'.$instance->id; $$var = optional_param($var,0); @@ -82,8 +85,10 @@ $restore->mods[$modname]->restore=$$var; $var = "restore_user_info_".$modname; $restore->mods[$modname]->userinfo=$$var; - $instances = $info->mods[$mod->name]->instances; + if ($instances === NULL) { + continue; + } foreach ($instances as $instance) { $var = 'restore_'.$modname.'_instance_'.$instance->id; $restore->mods[$modname]->instances[$instance->id]->restore = $$var;