Changed Image::by_hash so that it isn't case-sensitive

This commit is contained in:
Matthew Barbour 2020-02-10 14:44:36 -06:00
parent 6d58fe9b32
commit 152e55b5db

View File

@ -107,6 +107,7 @@ class Image
public static function by_hash(string $hash): ?Image
{
global $database;
$hash = strtolower($hash);
$row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]);
return ($row ? new Image($row) : null);
}