diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index a49267aed..06144d3e5 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -76,7 +76,7 @@ if (!is_numeric($sequence)) { UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence")); } -$expires = ($_POST["expires"] == "true") ? mktime(0,0,0, intval($_POST["expmonth"]), intval($_POST["expday"]), intval($_POST["expyear"])) : false; +$expires = (isset($_POST["expires"]) && $_POST["expires"] == "true") ? mktime(0,0,0, intval($_POST["expmonth"]), intval($_POST["expday"]), intval($_POST["expyear"])) : false; // Get the list of reviewers and approvers for this document. $reviewers = array();