diff --git a/public/main/admin/course_add.php b/public/main/admin/course_add.php index 5748851187..ee41a295b7 100644 --- a/public/main/admin/course_add.php +++ b/public/main/admin/course_add.php @@ -199,7 +199,7 @@ if ($form->validate()) { $courseData['gradebook_model_id'] = isset($courseData['gradebook_model_id']) ? $courseData['gradebook_model_id'] : null; if (isset($courseData['duration'])) { - $courseData['duration'] = $courseData['duration'] * 60; // Convert minutes to seconds + $courseData['duration'] = (int) $courseData['duration'] * 60; // Convert minutes to seconds } if (!empty($courseData['course_language'])) {