Received the following error when trying to view user profiles (with statuses enabled, that show view statuses_stream, with mention -dev version, processing through a plain text filter):
PHP Fatal error: [] operator not supported for strings
*coming from*
l() /path/to/my/site/sites/all/modules/mentions/mentions.module:543
After some debugging, and based on this clue I added an array() wrapper to the class attribute in the l() function, like so:
return l($settings['output']['prefix'] . $text . $settings['output']['suffix'], $link, array(
'attributes' => array(
'class' => array('mentions mentions-' . $user->uid),
'title' => $text,
),
));
Which *appears* to have resolved the issue for me.
A patch attempt is forthcoming, just need to create the issue first. I think. I'm new to patches, please let me know if I goof something.
Comments
Comment #1
jweirather commentedAttaching the patch. Tested applying against my own dev version and it appears to have worked.
Comment #2
jweirather commentedUpdated title
Comment #3
eiriksmCan confirm this.
Can also confirm this is critical, since this totally breaks some pages.
Attached patch fixes the issue (was about to post a similar one myself)
Comment #5
eiriksmWeird whitespace issue in patch, possibly due to #2462661: mentions.module file issue?
Anyway, here is a clean(er) patch.
Comment #7
eiriksmOuch. You really should also look at the above mentioned issue. Trying this one, see if that works. Still same patch, only line ending changes.
Comment #9
eiriksmOK, that was not easy. One more try.
Comment #11
eiriksmOK, no idea how to create a patch that only touches this code, and still get it to apply. I could write a patch against the patched mentions.module file, but that would still not apply. Or a patch that also converts the line endings in the file, but that would of course be a large patch. Also, that patch already exists in #2462661: mentions.module file issue.
So just setting this to RTBC. I tested the patch and it works exactly as planned.
Comment #12
decipheredFixed and committed. Thanks for your hard work.