mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Try to prevent Carbon date errors when postdate is, for some weird reason, null
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-01-26 DariusIII
|
||||
* Chg: Try to prevent Carbon date errors when postdate is, for some weird reason, null
|
||||
* Chg: Fix wrong NN_INSTALLER constant usage in User model
|
||||
* Chg: Update nikic/php-parser to latest version
|
||||
* Chg: Use artisan console to reset database, update reset_truncate script to use Eloquent and query builder
|
||||
|
||||
@@ -350,7 +350,7 @@ class PostProcess
|
||||
if ($filesAdded < 11 && ReleaseFile::query()->where(['releases_id' => $relID, 'name' => $file['name']])->first() === null) {
|
||||
|
||||
// Try to add the files to the DB.
|
||||
if (ReleaseFile::addReleaseFiles($relID, $file['name'], $file['hash_16K'], $file['size'], Carbon::createFromFormat('Y-m-d H:i:s', $query['postdate']), 0)) {
|
||||
if (ReleaseFile::addReleaseFiles($relID, $file['name'], $file['hash_16K'], $file['size'], $query['postdate'] !== null ? Carbon::createFromFormat('Y-m-d H:i:s', $query['postdate']) : Carbon::now(), 0)) {
|
||||
$filesAdded++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user