diff --git a/question/contextmove.php b/question/contextmove.php index ad7ad18072d..cf30301e6cb 100644 --- a/question/contextmove.php +++ b/question/contextmove.php @@ -92,7 +92,7 @@ $thispageurl->remove_params('cattomove', 'toparent', 'totop'); redirect($CFG->wwwroot."/question/category.php?".$thispageurl->get_query_string()); }elseif ($moveformdata = $contextmoveform->get_data()) { - if (is_array($moveformdata->urls)){ + if (isset($moveformdata->urls) && is_array($moveformdata->urls)){ check_dir_exists($CFG->dataroot."/$tocoursefilesid/", true); $flipurls = array_keys($urls); foreach ($moveformdata->urls as $key => $urlaction){