Commit a54fedef authored by Robert Lyon's avatar Robert Lyon

Bug 1654894: Institution defaultmembershipperiod being set to 0

Rather than being set as null behatnotneeded Change-Id: I87ad0bea91ca7df747ee2a5fed731ceef29f434d Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 8ec91ce6
......@@ -44,7 +44,7 @@ class Institution {
'registerallowed' => 0,
'registerconfirm' => 1,
'theme' => null,
'defaultmembershipperiod' => 0,
'defaultmembershipperiod' => null,
'maxuseraccounts' => null,
'expiry' => null,
'expirymailsent' => 0,
......@@ -131,11 +131,13 @@ class Institution {
break;
case 'id':
case 'defaultmembershipperiod':
case 'maxuseraccounts':
case 'showonlineusers':
$value = (int) $value;
break;
case 'defaultmembershipperiod':
$value = is_null($value) ? null : (int) $value;
break;
}
if (array_key_exists($name, self::$dbfields)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment