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

Commit

Permalink
error variables names..
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreG89 authored Oct 16, 2018
1 parent 20367ad commit 2d67fed
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 2d67fed

Please sign in to comment.