Commit 2127246e authored by Mathieu's avatar Mathieu
Browse files

FIX #18461 TIME 70:00 fix postal address number error if 0

parent f46ff421
......@@ -124,6 +124,7 @@ class DatasourceController
$contact = ContactModel::getById(['id' => $resourceContacts['item_id'], 'select' => ['*']]);
$postalAddress = ContactController::getContactAfnor($contact);
unset($postalAddress[0]);
$contact['postal_address'] = implode("\n", $postalAddress);
}
......
......@@ -23,7 +23,7 @@ class TextFormatModel
$a = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕ';
$b = 'aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr';
$test = 'ok';
$string = utf8_decode($aArgs['string']);
$string = strtr($string, utf8_decode($a), $b);
$string = strtolower($string);
......
......@@ -27,6 +27,9 @@ class ValidatorModel
if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '' && $args[$key] != '') {
$args[$key] .= 'NOT_EMPTY';
}
if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '0') {
$args[$key] .= 'NOT_EMPTY';
}
if (!Validator::notEmpty()->validate($args[$key])) {
throw new \Exception("Argument {$key} is empty");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment