Download & Extend

warning: array_merge_recursive() includes/common.inc on line 1680 for anonymous visitors

Project:Node stack
Version:5.x-1.0
Component:Backend
Category:bug report
Priority:normal
Assigned:sinasalek
Status:active

Issue Summary

Hi,
Following code prints to the page even when users does not have access to nodestack.

function nodestack_nodeapi(&$node, $op) {
if (user_access(nodestack_perm())) {
switch ($op) {
case 'alter':
drupal_add_js(array('nodestack' => array('node-'. $node->nid => array(
'title' => $node->title,
'url' => url('node/'. $node->nid),
))), 'setting');
break;
}
}
}

Other parts of the code may have this problem as well.
Patch is attached, hope it helps

AttachmentSize
disable_js_for_anonymous_visitors.patch917 bytes
nobody click here