From 5312e5060eca46eb213a1d568eaa6424d1b232dc Mon Sep 17 00:00:00 2001 From: kj Date: Sat, 13 Jun 2026 15:30:16 -0300 Subject: [PATCH] fix(model): reset dbQueryVariables before update and insert Clear the static $dbQueryVariables array before performing update and insert operations to prevent data leakage between queries. --- src/Libs/Model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Libs/Model.php b/src/Libs/Model.php index 0161e0f..3cbbfad 100644 --- a/src/Libs/Model.php +++ b/src/Libs/Model.php @@ -423,6 +423,7 @@ class Model protected function update(): void { $atts = $this->getVars(); + static::$dbQueryVariables = []; foreach ($atts as $key => $value) { if (isset($value)) { @@ -457,6 +458,7 @@ class Model $atts = $this->getVars(); $into = []; $values = []; + static::$dbQueryVariables = []; foreach ($atts as $key => $value) { if (isset($value)) {