From bc3a55d6b436d4d99f96b2e800f4e157c23ec855 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Mon, 11 Dec 2023 23:33:16 +0200 Subject: [PATCH] Tiny fix --- epp/src/helpers.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/epp/src/helpers.php b/epp/src/helpers.php index caa3a1f..2ca9c25 100644 --- a/epp/src/helpers.php +++ b/epp/src/helpers.php @@ -438,8 +438,12 @@ function updatePermittedIPs($pool, $permittedIPsTable) { $permittedIPs = $stmt->fetchAll(PDO::FETCH_COLUMN, 0); $pool->put($pdo); - // Clear the table and insert new values - $permittedIPsTable->truncate(); + // Manually clear the table by removing each entry + foreach ($permittedIPsTable as $key => $value) { + $permittedIPsTable->del($key); + } + + // Insert new values foreach ($permittedIPs as $ip) { $permittedIPsTable->set($ip, ['addr' => $ip]); }