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_m22_cohort' of git://github.com/skodak/mo…

…odle into MOODLE_22_STABLE
  • Loading branch information...
commit 7d6c1a19bbdbe90deec1b033bdfc230d0568f33e 2 parents 94cfcb3 + 0908a1a
@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.