Skip to content

Commit 3b50b08

Browse files
committed
Fix the db-> exists check.
1 parent 5c40e87 commit 3b50b08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/core/DB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function exists($table, $values, &$result = null) {
134134
$q = "SELECT * FROM $table WHERE {$where} LIMIT 1";
135135
$result = $this->execute($q, $params);
136136

137-
return !is_null($result);
137+
return count($result) > 0;
138138
}
139139

140140
function getLastError() {

0 commit comments

Comments
 (0)