Skip to content

Commit b626255

Browse files
committed
Merge pull request #341 from avbdr/master
fixes
2 parents 531957a + 44c8895 commit b626255

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dbObject.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function __unset ($name) {
186186
*/
187187
private function JsonBuilder () {
188188
$this->returnType = 'Json';
189-
return $this;
189+
return $return;
190190
}
191191

192192
/**
@@ -233,7 +233,7 @@ public function insert () {
233233
return false;
234234

235235
$id = $this->db->insert ($this->dbTable, $sqlData);
236-
if (!empty ($this->primaryKey) && !isset($this->data[$this->primaryKey]))
236+
if (!empty ($this->primaryKey) && empty ($this->data[$this->primaryKey]))
237237
$this->data[$this->primaryKey] = $id;
238238
$this->isNew = false;
239239

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $data = Array ("login" => "admin",
126126
"createdAt" => $db->now(),
127127
"updatedAt" => $db->now(),
128128
);
129-
$updateColumns = Array ("updateAt");
129+
$updateColumns = Array ("updatedAt");
130130
$lastInsertId = "id";
131131
$db->onDuplicate($updateColumns, $lastInsertId);
132132
$id = $db->insert ('users', $data);

0 commit comments

Comments
 (0)