fixes
This commit is contained in:
parent
95f4474b72
commit
9ac8246fa2
2 changed files with 3 additions and 3 deletions
|
@ -271,7 +271,7 @@ class Database
|
|||
}
|
||||
|
||||
/**
|
||||
* Execute an SQL query and return a single value.
|
||||
* Execute an SQL query and return a single value, or null.
|
||||
*/
|
||||
public function get_one(string $query, array $args=[], bool $scoreql = false)
|
||||
{
|
||||
|
@ -281,7 +281,7 @@ class Database
|
|||
$_start = microtime(true);
|
||||
$row = $this->execute($query, $args)->fetch();
|
||||
$this->count_time("get_one", $_start, $query, $args);
|
||||
return $row[0];
|
||||
return $row ? $row[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,7 +70,7 @@ class PixelFileHandler extends DataHandlerExtension
|
|||
return false;
|
||||
}
|
||||
$info = getimagesize($tmpname);
|
||||
if (is_null($info)) {
|
||||
if (!$info) {
|
||||
return false;
|
||||
}
|
||||
if (in_array($info[2], $valid)) {
|
||||
|
|
Reference in a new issue