Fix typo: Replace bitwise '&' with logical '&&' in condition

Created on 16 April 2025, 14 days ago

Problem/Motivation

While working with #3518675, I noticed that redirectLogout() function uses bitwise operator (&) instead of logical operator (&&) while checking if any client names returned for this user based on its username. As this appears to be a typo, I've created a separate issue to ensure it is fixed sooner rather than later :-)

Steps to reproduce

https://git.drupalcode.org/project/openid_connect/-/blob/3.x/src/Control...

Proposed resolution

The getAll() method from the external authmap service is expected to return an array. Therefore, the
is_array check is redundant and can be removed.

// Before
if (is_array($mapped_users) & !empty($mapped_users)) {

// After
if (!empty($mapped_users)) {

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇫🇮Finland mitrpaka

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024