--- lib/Strix.pm 2008/06/16 20:08:28 181 +++ lib/Strix.pm 2008/06/16 22:17:06 185 @@ -52,7 +52,7 @@ Jifty->log->info("Connect to instance $instance with dsn $dsn"); - my $dbh = DBI->connect( $dsn, $database->{user}, $database->{passwd} ) or die $DBI::errstr; + my $dbh = DBI->connect( $dsn, $database->{user}, $database->{passwd} ) or die "$DBI::errstr\n"; $instance_dbh->{$instance} = $dbh; @@ -236,6 +236,11 @@ } my $depth = $kat->{depth}; + if ( ! defined $pos[ $depth - 2 ] ) { + warn "FIXING CATEGORY: ",dump( $kat ); + $node->{class} = "error"; + $depth--; + } @pos = splice( @pos, 0, $depth ); $pos[ $depth - 1 ]++;