From 5184f1b679ecd4ba8483664c6f0add8f9bf204bf Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot Date: Tue, 26 May 2020 15:29:26 +0100 Subject: [PATCH] Fix core#1773 unsubscribe form causes errors if submitted twice --- CRM/Mailing/Form/Unsubscribe.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CRM/Mailing/Form/Unsubscribe.php b/CRM/Mailing/Form/Unsubscribe.php index 4f2c4f7874..95a6759659 100644 --- a/CRM/Mailing/Form/Unsubscribe.php +++ b/CRM/Mailing/Form/Unsubscribe.php @@ -16,6 +16,14 @@ */ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { + /** + * Prevent people double-submitting the form (e.g. by double-clicking). + * https://lab.civicrm.org/dev/core/-/issues/1773 + * + * @var bool + */ + public $submitOnce = TRUE; + public function preProcess() { $this->_type = 'unsubscribe'; -- 2.25.1