PHP 8.1 error with "Get Options From MySQL Query"

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2022   (RSS)

By daniel - May 24, 2022

Hi dbown,

This is an error we're aware of and there should be a fix coming in the next release of CMSB. In the meantime, can you try out this fix?

In /cmsb/lib/menus/default/actionHandler.php on line 115, replace this:

    $selectedAttr = ($value == @$_REQUEST['selectedValue'] || @in_array($value, $_REQUEST['selectedValue'])) ? 'selected="selected"' : '';

with this:

    $selectedAttr = ($value == @$_REQUEST['selectedValue'] || (is_array($_REQUEST['selectedValue']) && in_array($value, $_REQUEST['selectedValue']))) ? 'selected="selected"' : '';

Let me know if that fixes the issue, or if you have any other questions.

Thanks!

Daniel
Technical Lead
interactivetools.com

By dbown - May 25, 2022

Thanks Daniel... that change worked.