Only variables should be passed by reference in intercept_core.module

Created on 24 March 2023, over 1 year ago
Updated 20 April 2023, about 1 year ago

Problem/Motivation

Drupal reports a php notice from intercept_core_user_load(): `Notice: Only variables should be passed by reference in intercept_core_user_load() (line 188 of modules/contrib/intercept/modules/intercept_core/intercept_core.module).`

Steps to reproduce

Install the 8.x-1.x branch and authenticate (triggers implementations of hook_ENTITY_TYPE_load() with the `user` entity type) and observe the notice.

Proposed resolution

When loading $profiles in intercept_core_user_load(), first create an array of uids (call it `$uids`, for example), then pass reset($uids) as the `uid` parameter in $profile_storage->loadByProperties().

Remaining tasks

Patch forthcoming.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States COBadger

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

Comments & Activities

Production build 0.69.0 2024