Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'w10_MDL-31807_m20_cohort' of git://github.com/skodak/mo…

…odle into MOODLE_20_STABLE
  • Loading branch information...
commit da27633d029f2ab922f49de08ed9199711566bbd 2 parents c4e4b6a + 2ff7800
@samhemelryk samhemelryk authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 cohort/lib.php
View
5 cohort/lib.php
@@ -71,8 +71,9 @@ function cohort_add_cohort($cohort) {
*/
function cohort_update_cohort($cohort) {
global $DB;
- if (isset($cohort->component) and empty($cohort->component)) {
- $cohort->component = NULL;
+ if (property_exists($cohort, 'component') and empty($cohort->component)) {
+ // prevent NULLs
+ $cohort->component = '';
}
$cohort->timemodified = time();
$DB->update_record('cohort', $cohort);
Please sign in to comment.
Something went wrong with that request. Please try again.