From 9715edfa881907981fbece19122030ca252248af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sun, 10 Nov 2013 21:58:06 +0100 Subject: [PATCH] bugfix setting manager --- application/core/settingManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/core/settingManager.php b/application/core/settingManager.php index d0a8311d..dc53c6f2 100644 --- a/application/core/settingManager.php +++ b/application/core/settingManager.php @@ -186,7 +186,8 @@ class SettingManager { ?, ?, ?, @value := ?, @value - );"; + ) ON DUPLICATE KEY UPDATE + `index` = LAST_INSERT_ID(`index`);"; $settingStatement = $mysqli->prepare($settingQuery); if ($mysqli->error) { trigger_error($mysqli->error); @@ -196,6 +197,7 @@ class SettingManager { $settingStatement->execute(); if ($settingStatement->error) { trigger_error($settingStatement->error); + $settingStatement->close(); return false; } $settingStatement->close();