Reviewed: https://reviews.mahara.org/9073 Committed: https://git.mahara.org/mahara/mahara/commit/1f7125418016bb0486f4b3db007747fa5c3ee49f Submitter: Cecilia Vela Gurovic ([email protected]) Branch: master
commit 1f7125418016bb0486f4b3db007747fa5c3ee49f Author: Robert Lyon <[email protected]> Date: Fri Aug 17 10:54:42 2018 +1200 Bug 1787493: Checking select option key with cast behatnotneeded Change-Id: Ib635d325c757e54d4a7a2403eebecffad08694b0 Signed-off-by: Robert Lyon <[email protected]> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1787493 Title: Unable to have both "" and "0" as options in a select form and have "" the selected one Status in Mahara: Fix Committed Bug description: This is due to the function pieform_element_select_render_options() not checking on type the line $stringvalue = !is_array($values) && $key == $values; needs to be $stringvalue = !is_array($values) && $key === $values; To test create a select field with options like this: 'options' => array("" => get_string('nocategoryselected', 'mahara')) + array_combine(range(100, 0), range(100, 0)), and have 'defaultvalue' = '', Expected: we should have the nocategoryselected option displayed Currently: we have the option "0" selected To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1787493/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

