Drupal 7.22, PHP 5.3.3, lastest dev linage

When saving/updating list of terms in vocabulary, got these error:

Notice: Undefined index: base in lineage_update_term_r() (line 223 of /global/www/sites/all/modules/lineage/lineage.module).
Notice: Undefined index: depth in lineage_update_term_r() (line 226 of /global/www/sites/all/modules/lineage/lineage.module).

Look at the code inline:

  // Extend the base.
  $base['base'] .= lineage_string($term);

  // Table wants NO NULL, so just make sure.
  $base['depth'] = intval($base['depth']);

error produce because 'base' in $base[], was not found and never set before. I try to add:
$base = '';
before $base['base'], but it wouldn't help since number for lineage and depth didn't update in database.

Comments

tomcon’s picture

Will there be a solution to this problem?

kojis’s picture

Worth pointing out that these are benign messages for me. The module seems to function fine otherwise.

Until a more elegant approach is produced, you can suppress the notices in code, or try forcing the array prior to the error line:
if(!isset($base['base'])) $base['base']='';
if(!isset($base['depth'])) $base['depth']='';

cafuego’s picture

Status: Active » Fixed

Sorted in the latest 7.x-1.x-dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

add on drupal, php and module version