From f0958e5f609c20070e6d6b33c8509989e2f237e9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 7 Dec 2020 07:40:49 +0000 Subject: over: gracefully show invalid ibx_id While "public-inbox-extindex --gc" invocations try to ensure proper ordering, it is still possible for users to change the `inboxes' tables via sqlite3(1) or similar means. So show a "missing://ibx_id=$ibx_id" placeholder to avoid undefined variable warnings. URLs such as "imaps://..." will eventually be supported as eidx_keys, so having a URL-like "missing://" as a placeholder probably makes sense. --- lib/PublicInbox/Over.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/Over.pm') diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm index f34e7fc1..51284601 100644 --- a/lib/PublicInbox/Over.pm +++ b/lib/PublicInbox/Over.pm @@ -275,6 +275,7 @@ SELECT eidx_key FROM inboxes WHERE ibx_id = ? my $r = $_; $eidx_key_sth->execute($r->[0]); my $eidx_key = $eidx_key_sth->fetchrow_array; + $eidx_key //= "missing://ibx_id=$r->[0]"; "$eidx_key:$r->[1]:".unpack('H*', $r->[2]); } @$rows ]; } -- cgit v1.2.3-24-ge0c7