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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wjaspers’s picture

Status: Active » Needs review
FileSize
1.07 KB

Patch attached.

EDIT: Crap, forgot to run git reset. Will re-post.

wjaspers’s picture

Corrected patch.

ygerasimov’s picture

Status: Needs review » Fixed

Committed. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit efee35b on 7.x-1.x, development, import authored by wjaspers, committed by ygerasimov:
    Issue #1513832 by wjaspers: crm_core_contact strict PHP warning.
    
    

  • Commit efee35b on 7.x-1.x, development, import, activity_pages authored by wjaspers, committed by ygerasimov:
    Issue #1513832 by wjaspers: crm_core_contact strict PHP warning.