Changed Image::by_hash so that it isn't case-sensitive
This commit is contained in:
parent
6d58fe9b32
commit
152e55b5db
@ -107,6 +107,7 @@ class Image
|
|||||||
public static function by_hash(string $hash): ?Image
|
public static function by_hash(string $hash): ?Image
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
|
$hash = strtolower($hash);
|
||||||
$row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]);
|
$row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]);
|
||||||
return ($row ? new Image($row) : null);
|
return ($row ? new Image($row) : null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user