PDO returns 'false' for no rows, but various parts of the code expect it to return 'null'; for now, emulate the old behaviour
This commit is contained in:
parent
ae17700a30
commit
1abb96159b
@ -359,7 +359,8 @@ class Database {
|
||||
* Execute an SQL query and return a single row
|
||||
*/
|
||||
public function get_row($query, $args=array()) {
|
||||
return $this->execute($query, $args)->fetch();
|
||||
$row = $this->execute($query, $args)->fetch();
|
||||
return $row ? $row : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user