Merged in bugfix/PMCORE-2704 (pull request #7743)

PMCORE-2704

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2021-01-18 14:40:46 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 13 additions and 1 deletions

View File

@@ -617,7 +617,7 @@ function applyMaskDateEnvironment(string $date, $mask = '')
$systemConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
$mask = isset($systemConf->aConfig['dateFormat']) ? $systemConf->aConfig['dateFormat'] : '';
}
if (!empty($date)) {
if (!empty($date) && !empty($mask)) {
$date = new DateTime($date);
$result = $date->format($mask);
} else {