Prevent insertion of blank searchnames for releases

This commit is contained in:
DariusIII
2018-06-18 12:43:36 +02:00
parent 2bcc6f1429
commit 87bf8cf97b
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -596,7 +596,7 @@ class ProcessReleases
$releaseID = Release::insertRelease(
[
'name' => $cleanRelName,
'searchname' => utf8_encode($cleanedName),
'searchname' => ! empty($cleanedName) ? utf8_encode($cleanedName) : $cleanRelName,
'totalpart' => $collection['totalfiles'],
'groups_id' => $collection['groups_id'],
'guid' => createGUID(),
@@ -610,7 +610,7 @@ class ProcessReleases
]
);
if ($releaseID !== false) {
if ($releaseID !== null) {
// Update collections table to say we inserted the release.
$this->pdo->queryExec(
sprintf(