Browse Source

see #5188 migrate: Undefined index: activate_legal

Laurent Opprecht 12 years ago
parent
commit
5323c642d1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/inc/lib/main_api.lib.php

+ 1 - 1
main/inc/lib/main_api.lib.php

@@ -1271,7 +1271,7 @@ function api_get_course_info($course_code = null) {
 
             // The real_id is an integer. It is mandatory for future implementations.
             $_course['real_id'     ]          = $course_data['id'              ];
-            $_course['activate_legal']        = $course_data['activate_legal'];
+            $_course['activate_legal']        = isset($course_data['activate_legal']) ? $course_data['activate_legal'] : false;
 
 			//I know this is bad, but this reflects that it was a bad decistion to not add a flag in the DB if an image exists
 			if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic85x85.png')) {