format
This commit is contained in:
parent
6ba6c29d1f
commit
f0ee76e7c7
1 changed files with 4 additions and 4 deletions
|
@ -76,10 +76,10 @@ class Image
|
|||
public static function by_id(int $id): ?Image
|
||||
{
|
||||
global $database;
|
||||
if($id > 2**32) {
|
||||
// for some reason bots query huge numbers and pollute the DB error logs...
|
||||
return null;
|
||||
}
|
||||
if ($id > 2**32) {
|
||||
// for some reason bots query huge numbers and pollute the DB error logs...
|
||||
return null;
|
||||
}
|
||||
$row = $database->get_row("SELECT * FROM images WHERE images.id=:id", ["id"=>$id]);
|
||||
return ($row ? new Image($row) : null);
|
||||
}
|
||||
|
|
Reference in a new issue