Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
tomcon CreditAttribution: tomcon commentedWill there be a solution to this problem?
Comment #2
kojis CreditAttribution: kojis commentedWorth 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']='';
Comment #3
cafuego CreditAttribution: cafuego commentedSorted in the latest 7.x-1.x-dev.
Comment #4.0
(not verified) CreditAttribution: commentedadd on drupal, php and module version