From 6b0d09ace25d11b3fcb3929cd612cf9008d1c344 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 7 May 2024 08:54:53 +0200 Subject: [PATCH] FIX back to page on error in contact card --- htdocs/contact/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 0e996d560edd9..19a8df1b9e257 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -470,16 +470,13 @@ $no_email = GETPOST('no_email', 'int'); $result = $object->setNoEmail($no_email); if ($result < 0) { + $error++; setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit'; } } - - $action = 'view'; } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit'; } } } @@ -489,6 +486,9 @@ header("Location: ".$backtopage); exit; } + $action = 'view'; + } else { + $action = 'edit'; } }