* [PATCH] search_query: fix warnings on bogus `o=' query param
@ 2025-01-19 4:40 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2025-01-19 4:40 UTC (permalink / raw)
To: meta
Users may specify non-numeric values for the `o' parameter
which won't be captured. Avoid uninitialized variable warnings
by assuming `0' when no numeric value is specified.
---
lib/PublicInbox/SearchQuery.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/SearchQuery.pm b/lib/PublicInbox/SearchQuery.pm
index e0127dea..b420f125 100644
--- a/lib/PublicInbox/SearchQuery.pm
+++ b/lib/PublicInbox/SearchQuery.pm
@@ -22,7 +22,7 @@ sub new {
bless {
q => $q,
x => $qp->{x} || '',
- o => $o,
+ o => $o // 0,
l => $l,
r => (defined $r && $r ne '0'),
t => (defined $t && $t ne '0'),
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-19 4:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-19 4:40 [PATCH] search_query: fix warnings on bogus `o=' query param Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).