From c0fbc53920f41a7a8596619c9d57786679e67841 Mon Sep 17 00:00:00 2001 From: Devdatt Bhatt Date: Wed, 20 May 2026 10:16:49 +0000 Subject: [PATCH] update --- encoder/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/encoder/app.php b/encoder/app.php index 562e8c8..7941751 100644 --- a/encoder/app.php +++ b/encoder/app.php @@ -38,7 +38,8 @@ if (isset($_POST['submit'])) { $data_to_save[$field] = $_POST[$field] ?? ''; } - file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT)); + if (empty($errors)) + file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT)); } ?> @@ -138,5 +139,4 @@ function getValue($data, $key) - \ No newline at end of file