From e048c8dfb947b0e1c04febac48275ef3876ed1e6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Jun 2016 01:36:40 +0000 Subject: unsubscribe: archive_url may be undefined We'll show a nasty warning in the UI instead of triggering a perl warning about an undefined variable. --- lib/PublicInbox/Unsubscribe.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/Unsubscribe.pm b/lib/PublicInbox/Unsubscribe.pm index 239feea9..79234aa1 100644 --- a/lib/PublicInbox/Unsubscribe.pm +++ b/lib/PublicInbox/Unsubscribe.pm @@ -158,7 +158,7 @@ sub archive_info { } # protocol-relative URL: "//example.com/" => "https://example.com/" - if ($archive_url =~ m!\A//!) { + if ($archive_url && $archive_url =~ m!\A//!) { $archive_url = "$env->{'psgi.url_scheme'}:$archive_url"; } -- cgit v1.2.3-24-ge0c7