Повсюду улучшена проверка длин строк

This commit is contained in:
2020-05-28 22:56:26 +08:00
parent 9ea1c81666
commit ca32fe5923
5 changed files with 7 additions and 7 deletions

View File

@@ -118,7 +118,7 @@ class Kkt extends Client
if (!$this->isTestMode()) {
if (empty($login)) {
throw new AtolKktLoginEmptyException();
} elseif (strlen($login) > 100) {
} elseif ((function_exists('mb_strlen') ? mb_strlen($login) : strlen($login)) > 100) {
throw new AtolKktLoginTooLongException($login, 100);
}
}