Active
Project:
Inline Ajax Comments
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2013 at 20:20 UTC
Updated:
20 Feb 2014 at 18:30 UTC
Jump to comment: Most recent
I get these when I constructa view with contextual filter.
Fatal error: [] operator not supported for strings in /data/all/000/core/drupal-7.24.1/includes/common.inc on line 2446
I looked at the code and found in inline_comments_handler_field_inline_comments.inc from line 33 a wrong array.
if (user_access('access comments')) {
switch ($values->node_comment_statistics_comment_count) {
case 0:
$output .= l(t('0 Comments'), 'node/' . $values->nid, array('attributes' => array('class' => 'comment-click')));
break;
case 1:
$output .= l(t('View 1 Comment'), 'node/' . $values->nid, array('attributes' => array('class' => 'comment-click')));
break;
default:
The "class" must be an array.
So it should be
if (user_access('access comments')) {
switch ($values->node_comment_statistics_comment_count) {
case 0:
$output .= l(t('0 Comments'), 'node/' . $values->nid, array('attributes' => array('class' => array('comment-click'))));
break;
case 1:
$output .= l(t('View 1 Comment'), 'node/' . $values->nid, array('attributes' => array('class' => array('comment-click'))));
break;
default:Maybe it is related to other issue, but not sure at the moment.
Mark this a major, because a core function is expecting an array an causes an WSOD in some situtations.
Bad Title, changed it.
Comments
Comment #1
bennos commentedComment #2
socialnicheguru commentedcould you make a patch?