Cannot change default membership period back to 'no end date'

Bug #1970273 reported by Dianne Tennent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

MySQL8 on main branch
May be related to this bug here: https://bugs.launchpad.net/mahara/+bug/1965715

To replicate:
1. Create an institution with a default membership period e.g. 3 weeks
2. Save settings
3. Change default membership period to 'No end date'
4. Save settings

Expected:
 - Settings saved

Actual:
 - If I clear the input field and change the option to "No end date", I don't get an error, but the settings are not saved
 - If I just clear the input field and save the settings, I get an error (and settings are not saved):
[WAR] f1 (lib/pieforms/pieform/elements/expiry.php:130) A non-numeric value encountered
Call stack (most recent first):

    log_message("A non-numeric value encountered", 8, true, true, "/home/diannetennent/code/mahara/htdocs/lib/pieform...", 130) at /home/diannetennent/code/mahara/htdocs/lib/errors.php:515
    error(2, "A non-numeric value encountered", "/home/diannetennent/code/mahara/htdocs/lib/pieform...", 130, array(size 7)) at /home/diannetennent/code/mahara/htdocs/lib/pieforms/pieform/elements/expiry.php:130
    pieform_element_expiry_get_value(object(Pieform), array(size 7)) at /home/diannetennent/code/mahara/htdocs/lib/pieforms/pieform.php:928
    Pieform->get_value(array(size 7)) at /home/diannetennent/code/mahara/htdocs/lib/pieforms/pieform.php:1480
    Pieform->get_submitted_values() at /home/diannetennent/code/mahara/htdocs/lib/pieforms/pieform.php:553

Notes:
My instinct in this scenario was to clear the field i.e. remove the number 3 and save, so perhaps this would be the best option, rather than requiring people to also select 'No end date' after they have cleared the field.
    Pieform->__construct(array(size 5)) at /home/diannetennent/code/mahara/htdocs/lib/pieforms/pieform.php:173
    Pieform::process(array(size 5)) at /home/diannetennent/code/mahara/htdocs/lib/mahara.php:5754
    pieform(array(size 5)) at /home/diannetennent/code/mahara/htdocs/admin/users/institutions.php:723

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.