diff --git a/controllers/grid/users/reviewer/form/ThankReviewerForm.php b/controllers/grid/users/reviewer/form/ThankReviewerForm.php index 81ef8c994ab..ff7cd030647 100644 --- a/controllers/grid/users/reviewer/form/ThankReviewerForm.php +++ b/controllers/grid/users/reviewer/form/ThankReviewerForm.php @@ -149,11 +149,13 @@ public function execute(...$functionArgs) $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO'); /** @var ReviewAssignmentDAO $reviewAssignmentDao */ $reviewAssignment->setDateAcknowledged(Core::getCurrentDate()); $reviewAssignment->stampModified(); - $reviewAssignment->setConsidered( - $reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW - ? ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED - : ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED - ); + if(!in_array($reviewAssignment->getConsidered(), [ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED, ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED])) { + $reviewAssignment->setConsidered( + $reviewAssignment->getConsidered() === ReviewAssignment::REVIEW_ASSIGNMENT_NEW + ? ReviewAssignment::REVIEW_ASSIGNMENT_CONSIDERED + : ReviewAssignment::REVIEW_ASSIGNMENT_RECONSIDERED + ); + } $reviewAssignmentDao->updateObject($reviewAssignment); parent::execute(...$functionArgs);