Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: selected value in multidimensional form_dropdown #4993

Closed
gabriel-pnhr opened this issue Aug 8, 2021 · 1 comment · Fixed by #5035
Closed

Bug: selected value in multidimensional form_dropdown #4993

gabriel-pnhr opened this issue Aug 8, 2021 · 1 comment · Fixed by #5035
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@gabriel-pnhr
Copy link
Contributor

Bug
the selected value does not work in form_dropdown helper with a multidimensional array as input

Solution to fix it
In this file : /system/Helpers/form_helper.php
between line 320 and 321 add the following code :
$optgroupKey = (string) $optgroupKey;

(Exactly as in line 311, so as not to compare an integer with a string)

@gabriel-pnhr gabriel-pnhr added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 8, 2021
@MGatner
Copy link
Member

MGatner commented Aug 9, 2021

If you have a solution, please submit a Pull Request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants