We are seeing the following error when strict and full errors are on:

Strict warning: Only variables should be passed by reference in Drupal\broken_link\Entity\BrokenLink->loadByLink() (line 86 of modules/broken_link/src/Entity/BrokenLink.php).

CommentFileSizeAuthor
#2 2877841_broken_link_pass_by_ref.patch601 bytesseanbfuller

Comments

seanbfuller created an issue. See original summary.

seanbfuller’s picture

StatusFileSize
new601 bytes

The attached patch should fix the issue.

seanbfuller’s picture

Status: Active » Needs review
jhuhta’s picture

Version: 8.x-2.1 » 8.x-2.2
Status: Needs review » Reviewed & tested by the community

Patch works and fixes the error also in v2.2 . +1

I'd change also the array_shift() call to reset() (and then the return value check from NULL to FALSE in merge()), and replace the deprecated entityManager() from the function, but those may be outside the scope of this issue.

manojapare’s picture

Status: Reviewed & tested by the community » Fixed

This issue is been fixed in 3.x branch.

Status: Fixed » Closed (fixed)

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