From 30b29f4dfcf3241c0e259da73bcac751543f1de2 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 8 Mar 2016 16:50:16 -0500 Subject: [PATCH] Remove E_NOTICE when add a course --- main/admin/course_add.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/admin/course_add.php b/main/admin/course_add.php index d613257cb4..93b75ac1d4 100755 --- a/main/admin/course_add.php +++ b/main/admin/course_add.php @@ -173,7 +173,7 @@ if ($form->validate()) { $course['wanted_code'] = $course['visual_code']; $course['gradebook_model_id'] = isset($course['gradebook_model_id']) ? $course['gradebook_model_id'] : null; // Fixing category code - $course['course_category'] = $course['category_code']; + $course['course_category'] = isset($course['category_code']) ? $course['category_code'] : ''; $course_info = CourseManager::create_course($course); header('Location: course_list.php'.($course_info===false?'?action=show_msg&warn='.api_get_last_failure():''));