Make sure File_thumbnail->getPath() doesn't throw NoResultException

This commit is contained in:
Mikael Nordfeldth
2016-03-09 23:49:01 +01:00
parent bd75305560
commit 15c16ac54e
3 changed files with 49 additions and 38 deletions

View File

@@ -503,7 +503,7 @@ function setFilehashOnLocalFiles()
printfnq('Ensuring all local files have the filehash field set...');
$file = new File();
$file->whereAdd('filename IS NOT NULL'); // local files
$file->whereAdd('filename IS NOT NULL AND filename != ""'); // local files
$file->whereAdd('filehash IS NULL', 'AND'); // without filehash value
if ($file->find()) {