Closed (fixed)
Project:
Quickbar
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 20:56 UTC
Updated:
21 May 2013 at 21:21 UTC
Quickbar_extras (I think when paired with user/me) though I'm not 100% sure.
Anyway on load of the /user/me page or the logged in user's own page directly, (or say /users/ while logged on).
The effect is a critical error:
Fatal error: [] operator not supported for strings in {{My host dir}}/includes/common.inc on line 2320
Error appeared right after we installed quickbar, so with a bit of tracking we found the errant 'l()' call that was causing the problem, the 'title' component uses a link:
quickbar/modules/quickbar_extras/quickbar_extras.module: line 182
context snipit:
...
if ($settings['show_username_link']) {
$vars['tree'][0]['right']['username'] = array(
'title' => $username_prefix . l($user->name, 'user/' . $user->uid, array('attributes' => array('class' => 'username-link'))) . $username_suffix,
'html' => 1,
);
}
else {
...
The problem is that the 'class' component needs to be an array in d7, so my proposed fix:
...
if ($settings['show_username_link']) {
$vars['tree'][0]['right']['username'] = array(
'title' => $username_prefix . l($user->name, 'user/' . $user->uid, array('attributes' => array(
'class' => array ( 'username-link' )))) . $username_suffix,
'html' => 1,
);
}
else {
...
Comments
Comment #1
jefkin commentedwrong beta version
Comment #2
philipnorton42 commentedI can confirm that this change works. I just had the same problem and fixed the code in the same way.
Comment #3
redndahead commentedThis looks like it is fixed in dev.