From 70ab66af5817d28dd46a338896d40f2b3fee1e21 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 20 Dec 2023 23:53:19 +0100 Subject: [PATCH] word/report: ignore empty history post data Prevent exception on invalid calls. --- word/report.plp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/word/report.plp b/word/report.plp index 56d6188..c40b0af 100644 --- a/word/report.plp +++ b/word/report.plp @@ -8,5 +8,5 @@ $db->insert(report => { agent => $ENV{HTTP_USER_AGENT}, page => $ENV{HTTP_REFERER}, address => $ENV{REMOTE_ADDR}, - history => $PLP::read->($ENV{CONTENT_LENGTH}), + history => (map {$_ ? $PLP::read->($_) : undef} $ENV{CONTENT_LENGTH}), }); -- 2.30.0