Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Strict warning: Only variables should be passed by reference in crm_core_contact_type_load() (line 505 of sites/all/modules/crm_core/modules/crm_core_contact/crm_core_contact.module).
PHP strict warnings are occurring and could lead to bugs appearing on production sites.
This is appearing in the use of reset()
for the function crm_core_contact_type_load()
.
Proposed resolution
Put entity_load results into a variable, like $results
, and reset the variable.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | crm_core_contact-1513832-2.patch | 661 bytes | wjaspers |
#1 | crm_core_contact-1513832-1.patch | 1.07 KB | wjaspers |
Comments
Comment #1
wjaspers CreditAttribution: wjaspers commentedPatch attached.
EDIT: Crap, forgot to run git reset. Will re-post.
Comment #2
wjaspers CreditAttribution: wjaspers commentedCorrected patch.
Comment #3
ygerasimov CreditAttribution: ygerasimov commentedCommitted. Thank you!