This was triggered by blindly trying to FETCH an MSN (not
"UID FETCH") on an empty dummy inbox. It's harmless, and
probably triggered by a wayward client or misbehaving bot.
# converts a set of message sequence numbers in requests to UIDs:
sub msn_to_uid_range ($$) {
my $msn2uid = $_[0];
- $_[1] =~ s!([0-9]+)!$msn2uid->[$1 - 1] // ($msn2uid->[-1] + 1)!sge;
+ $_[1] =~ s!([0-9]+)!$msn2uid->[$1 - 1] // ($msn2uid->[-1] // 0 + 1)!sge;
}
# called by PublicInbox::InboxIdle
@hits = $mic->search('SENTSINCE' => '18-Apr-2020');
is_deeply(\@hits, [], 'search on dummy with condition works');
ok(!$mic->search('SENTSINCE' => '18-Abr-2020'), 'bad month fails');
+ $mic->Uid(0);
+ my $ret = $mic->fetch_hash(2, 'RFC822');
+ is_deeply($ret, {},
+ 'MSN FETCH on empty dummy will not trigger warnings, later');
}); # each_inbox
# message sequence numbers :<