From 8b493c53725690cde55776934bf6d155000a1b58 Mon Sep 17 00:00:00 2001 From: Marc Michalsky Date: Wed, 6 Oct 2021 15:15:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BE=20bug=20fix:=20undefined=20index?= =?UTF-8?q?=20in=20twinglecampaign.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twinglecampaign.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twinglecampaign.php b/twinglecampaign.php index 195ceb4..bda4f1d 100644 --- a/twinglecampaign.php +++ b/twinglecampaign.php @@ -82,7 +82,11 @@ function twinglecampaign_civicrm_postSave_civicrm_campaign($dao) { $_SESSION['CiviCRM']['de.forumzfd.twinglecampaign']['no_hook'] != TRUE) { // If request is not an API-Call - if ($_GET['action'] != 'create' && $_POST['action'] != 'create') { + if ( + ((isset($_GET['action']) && $_GET['action'] != 'create') || + (isset($_POST['action']) && $_POST['action'] != 'create')) || + (!isset($_GET['action']) && !isset($_POST['action'])) + ) { // If the db transaction is still running, add a function to it that will // be called afterwards