From 9c9de5f0c20aa167b81e6ae6b41a7f95ec6c1105 Mon Sep 17 00:00:00 2001 From: jerome mouneyrac Date: Wed, 1 Sep 2010 03:18:15 +0000 Subject: [PATCH] course publish MDL-24022 cast bool into int (enrollable field) --- course/publish/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/publish/lib.php b/course/publish/lib.php index 758c9b072dd..4d166eb0905 100644 --- a/course/publish/lib.php +++ b/course/publish/lib.php @@ -124,7 +124,7 @@ class course_publish_manager { $publication->huburl = $huburl; $publication->courseid = $courseid; $publication->hubcourseid = $hubcourseid; - $publication->enrollable = $enrollable; + $publication->enrollable = (int) $enrollable; $publication->timepublished = time(); $DB->insert_record('course_published', $publication); } @@ -244,7 +244,7 @@ class course_publish_manager { } if ($enrollable != -1) { - $params['enrollable'] = $enrollable; + $params['enrollable'] = (int) $enrollable; } $DB->delete_records('course_published', $params);