I'm not sure if it's related to Panels or if it's because there aren't any other node links, but this line:

<?php
      $node
->content['links']['node']['#links'] = array_merge($node->content['links']['node']['#links'], $links);
?>

is looking for a sub array "node" which doesn't exist. The #links array is in

<?php
$node
->content['links']['#links']
?>

I've included a snapshot of the node object to review. I can supply a patch, but I don't know if this issue is specifically with Panels, and if so, how to detect Panels to fix it.

Comments

I am seeing this error along with another one related when showing nodes associated with an OG group through panel:

Notice: Undefined index: node in _service_links_link() (line 191 of /home/biydng/public_html/sites/all/modules/service_links/service_links.module).
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _service_links_link() (line 191 of /home/biydng/public_html/sites/all/modules/service_links/service_links.module).

Did you fix your error?

no the other patch does not solve this issue

What about the last version (it seems one of the last patches fixed an undefined issue)?

Status:Active» Postponed (maintainer needs more info)

I'll give it a go this week.

I'm still getting this issue on the current 7.x-2.x-dev version. Any chance it could be checked again?

Issue summary:View changes
Status:Postponed (maintainer needs more info)» Needs review
StatusFileSize
new565 bytes

Depending on what exaclty calls hook_node_view, $node->content['links']['node']['#links'] in _service_links_link() might or might not exist.

I'm using panels and displaying a field in a pane. Here's the backtrace:

#0 path_to_drupal\sites\all\modules\contrib\service_links\service_links.module(146): _service_links_link(Object(stdClass), 'full')
#1 [internal function]: service_links_node_view(Object(stdClass), 'full', 'en')
#2 path_to_drupal\includes\module.inc(895): call_user_func_array('service_links_n...', Array)
#3 path_to_drupal\sites\all\modules\contrib\ctools\plugins\content_types\entity_context\entity_field_extra.inc(105): module_invoke_all('node_view', Object(stdClass)

see: ctools_entity_field_extra_content_type_render

Maybe you could check if $node->content['links']['node']['#links'] is set before using array_merge or use a foreach loop.

I'm getting this error too, using Panopoly (panels). The given patch works for me.

Could I have one more review before committing it?