Skip to content

Commit 2c0761b

Browse files
committed
Refactor bugfix to a more streamline code
1 parent 94fea95 commit 2c0761b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

MysqliDb.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,12 @@ public function update($tableName, $tableData)
317317
$this->_query = "UPDATE " . self::$_prefix . $tableName ." SET ";
318318

319319
$stmt = $this->_buildQuery (null, $tableData);
320-
if ($stmt->execute() == false) {
321-
$this->reset();
322-
$this->_stmtError = $stmt->error;
323-
return false;
324-
}
320+
$status = $stmt->execute();
325321
$this->reset();
322+
$this->_stmtError = $stmt->error;
326323
$this->count = $stmt->affected_rows;
327324

328-
return true;
325+
return $status;
329326
}
330327

331328
/**

0 commit comments

Comments
 (0)