fix(model): reset query state when database query fails
This commit is contained in:
@@ -176,6 +176,10 @@ class Model
|
||||
|
||||
$vars = json_encode(static::$dbQueryVariables);
|
||||
|
||||
if ($resetQuery) {
|
||||
static::resetQuery();
|
||||
}
|
||||
|
||||
throw new Exception(
|
||||
"\nError at query to database.\n" .
|
||||
"Query: $query\n" .
|
||||
|
||||
Reference in New Issue
Block a user