From: Mischa POSLAWSKY Date: Wed, 20 Dec 2023 22:53:19 +0000 (+0100) Subject: word/report: ignore empty history post data X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/70ab66af5817d28dd46a338896d40f2b3fee1e21 word/report: ignore empty history post data Prevent exception on invalid calls. --- 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}), });