T357: Validate the length of a year correctly.

This commit is contained in:
Peter Deltchev 2015-09-11 13:41:39 -07:00
parent 207569e597
commit f4f97acd9f

View file

@ -176,7 +176,7 @@ class ImportMLPMA extends Command {
if ($taggedYear !== null && $modifiedDate->year === $taggedYear) {
$releasedAt = $modifiedDate;
} else if ($taggedYear !== null && (string) $taggedYear !== 4) {
} else if ($taggedYear !== null && (string) Str::length($taggedYear) !== 4) {
$this->error('This track\'s tagged year makes no sense! Using the track\'s last modified date...');
$releasedAt = $modifiedDate;