word/report: ignore empty history post data
[sheet.git] / word / report.plp
index 56d6188eb002ef5c65a30fc309dd1ccb44efbab5..c40b0af13077212d4644df0ac4822a1b99be2dac 100644 (file)
@@ -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}),
 });