Database error now returns no results instead of false.
This commit is contained in:
parent
2a2921231f
commit
7131d016c5
@ -19,7 +19,11 @@ if ($from == 'assets') {
|
||||
$results = $database->select($from, '*', ['OR' => ['name[~]' => $q, 'order_number[~]' => $q]]);
|
||||
}
|
||||
|
||||
if ($results == false) {
|
||||
$results = [];
|
||||
}
|
||||
|
||||
//var_dump($database->error());
|
||||
//var_dump($results);
|
||||
|
||||
die(json_encode(['status' => 'OK', 'results' => $results]));
|
||||
die(json_encode(['status' => 'OK', 'results' => $results]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user