Error on

Hi, I’m new with Drupal and have been doing some research before post this, but never find something about this message that my site is throwing, hope someone can help me, the message is this:

Notice: Undefined index: name en tablesort_cell() (línea 171 de /home/j1o0wr4wqrrj/public_html/includes/

This message is repeated many times on some pages.

The function is this, but i don’t know if i fogot to upgrade something o what?

function tablesort_cell($cell, $header, $ts, $i) {
if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['field'])) {
if (is_array($cell)) {
   $cell['class'][] = 'active';
else {
   $cell = array('data' => $cell, 'class' => array('active'));
return $cell;

Hope someone can help me, my Drupal version is 7.64.

Thanks in advance!

Drupal version: