Problem/Motivation

It looks like the use of
https://git.drupalcode.org/project/miniorange_2fa/-/blame/5.0.x/src/Form...
" ->limit($this->config->get('mo_user_management_pages') ?? 5)"

is causing the query to return no values if mo_user_management_pages is blank.
This then causes a a fatal error on the subsequent fetchAll() call.

Steps to reproduce

In config set miniorange_2fa.settings.yml:mo_user_management_pages: ''
(I think this can be replicated by just deleting the value out of the input box and saving the form)

Proposed resolution

using ?->fetchAll() takes care of fatal error.

Would recommend that instead of using ?? you use ? empty(config...) instead. That way you test for the empty string if the value is set to ''.

I'd also recommend using query execute fetch all calls with ?-> to ensure you are not generating fatal errors.

Comments

luke.stewart created an issue. See original summary.

sourav_paul’s picture

I've tried to reproduce the issue but can't.
Please provide proper reproducing steps..

Needs more info..

sourav_paul’s picture

@luke.stewart Could you please update reproduce steps in details?

sudhanshu0542’s picture

Assigned: Unassigned » sudhanshu0542
Status: Active » Closed (cannot reproduce)

@luke.stewart We are unable to reproduce the issue, so we will be closing this issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.