In views 6.x-2.9, the function signature of views_break_phrase() changed from:

function views_break_phrase($str, $filter = NULL)

to

function views_break_phrase($str, &$filter)

See #329390: Potential PHP 4 bug: Variable missing reference

To cut a long story short, this breaks views integration in flag module, at least for me. The above issue states We might want to scan contrib and see if anyone is using it [with a single argument], but I guess no-one did.

Patch to follow.

CommentFileSizeAuthor
#1 flag-776242-1.patch808 bytesmalclocke

Comments

malclocke’s picture

StatusFileSize
new808 bytes

Attached patch follows the example set in views of passing $this as the second argument to views_break_phrase(). Not sure if doing so has any potential negative impact, but it appears to fix the issue for me.

tauno’s picture

Status: Active » Needs review

Making the same change in 6.x-2.0-beta2 gets rid of the error for me too.

quicksketch’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, I'll put this in next time I'm working on Flag.

ordually’s picture

Thanks for posting this! It has fixed the problem for me also.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks again tauno!

Status: Fixed » Closed (fixed)

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

dixon_’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Closed (fixed) » Needs review

Was this bug only fixed in 6.x-2.x? It still seems to exists in 6.x-1.x. The patch above works great and fixes the problem in 6.x-1.x too.

Can we apply the patch for 6.x-1.x too?

quicksketch’s picture

Status: Needs review » Reviewed & tested by the community

Hm, sure enough it doesn't look like this was applied to 1.x. Should apply there too.

mooffie’s picture

Status: Reviewed & tested by the community » Fixed
dixon_’s picture

Wonderful! Thanks!

Status: Fixed » Closed (fixed)

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