Add missing check in NodaTimeAutotranslater

This commit is contained in:
Joshua Ramon Enslin 2021-01-31 19:39:09 +01:00
parent 7ccdfd4659
commit 668477f199
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -754,7 +754,7 @@ final class NodaTimeAutotranslater {
*/
public static function getTranslations(array $timeInfo):array {
if (!empty($timespanDates = NodaTimeSplitter::attempt_splitting_from_till((string)$timeInfo['zeit_name']))) {
if (!empty($timeInfo['zeit_name']) and strlen((string)$timeInfo['zeit_name']) > 10 and !empty($timespanDates = NodaTimeSplitter::attempt_splitting_from_till((string)$timeInfo['zeit_name']))) {
$output = [];