From 0e631bd09ee8171d8b7eff4b2f1570d19eb6e502 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 30 Apr 2013 18:06:44 +0200 Subject: [PATCH] check if expires is set in POST request without php warning --- op/op.AddDocument.php | 2 +- op/op.UpdateDocument.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 147010889..fbe743974 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -77,7 +77,7 @@ if (!is_numeric($sequence)) { } $expires = false; -if ($_POST["expires"] != "false") { +if (!isset($_POST['expires']) || $_POST["expires"] != "false") { if($_POST["expdate"]) { $tmp = explode('-', $_POST["expdate"]); $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index e028bf4f3..dcfa92ad0 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -218,7 +218,7 @@ if ($_FILES['userfile']['error'] == 0) { } $expires = false; - if ($_POST["expires"] != "false") { + if (!isset($_POST['expires']) || $_POST["expires"] != "false") { if($_POST["expdate"]) { $tmp = explode('-', $_POST["expdate"]); $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);