Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from PierreG89/PierreG89-patch-1
Browse files Browse the repository at this point in the history
error variables names
  • Loading branch information
tschoffelen authored Oct 16, 2018
2 parents 20367ad + 2d67fed commit 48afee7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ function update($table, $fields = array(), $where = array(), $limit = false, $or
if (is_object($v) || is_array($v) || is_bool($v)) {
$v = serialize($v);
}
if($value === null) {
$query .= ' `' . $key . "`=NULL";
if($v === null) {
$query .= ' `' . $k . "`=NULL";
} else {
$query .= ' `' . $key . "`='" . $this->escape($value) . "'";
$query .= ' `' . $k . "`='" . $this->escape($v) . "'";
}
$nr++;
if ($nr != count($fields)) {
Expand Down

0 comments on commit 48afee7

Please sign in to comment.