File: /www/htdocs/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php
    Line 462: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect
    foreach ($condition['value'] as &$value) {
    } 

Comments

StephenRobinson created an issue. See original summary.

stephenrobinson’s picture

Issue tags: +PHP 7.0 (duplicate)
nedjo’s picture

Title: Error with PHP7 » Warning from code linter: Nested by-reference foreach loo
Category: Bug report » Task
Priority: Major » Normal
Status: Active » Closed (works as designed)
Issue tags: -PHP 7.0 (duplicate)

This message apparently is not issued by PHP and is not an error. It appears to come from some code linting tool such as https://github.com/sstalle/php7cc, see this line. At most, this issue would be a task to review the existing code in case the warning is relevant. While the source software may be related to PHP 7, there is no indication that this warning relates to a change introduced in that version of PHP; therefore removing the PHP 7 tag. Additionally, since there is no reason to suspect there is actually an error here, marking works as designed. If an issue arises, or if undertaking a review, please reopen.