From 38f66c9971018fb9cacb9f0f9f09858308407e2a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 12 Dec 2024 19:05:03 +0100 Subject: [PATCH] Tpl::display_ajax_return(): provided messages & errors event if is not a success return --- src/Tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tpl.php b/src/Tpl.php index a471fd9..e832b7d 100644 --- a/src/Tpl.php +++ b/src/Tpl.php @@ -671,7 +671,7 @@ class Tpl { ) http_response_code($error_code ? $error_code : 400); - if (($data['success'] ?? false) && !$keep_messages_on_success) { + if (!$keep_messages_on_success) { $data['messages'] = self :: get_messages(); if (!$data['messages']) unset($data['messages']); self :: purge_messages();