From 712a4507347bb30146b3abc25b15f650f4dbbf20 Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 18 Jul 2018 11:35:26 +0300 Subject: [PATCH] formula mb string functions --- .../Core/Formula/Functions/StringGroup/ContainsType.php | 2 +- .../Core/Formula/Functions/StringGroup/LowerCaseType.php | 2 +- .../Core/Formula/Functions/StringGroup/SubstringType.php | 6 +++--- .../Core/Formula/Functions/StringGroup/UpperCaseType.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/Espo/Core/Formula/Functions/StringGroup/ContainsType.php b/application/Espo/Core/Formula/Functions/StringGroup/ContainsType.php index e1ebdbb853..491fb50590 100644 --- a/application/Espo/Core/Formula/Functions/StringGroup/ContainsType.php +++ b/application/Espo/Core/Formula/Functions/StringGroup/ContainsType.php @@ -48,6 +48,6 @@ class ContainsType extends \Espo\Core\Formula\Functions\Base return false; } - return strpos($string, $needle) !== false; + return mb_strpos($string, $needle) !== false; } } \ No newline at end of file diff --git a/application/Espo/Core/Formula/Functions/StringGroup/LowerCaseType.php b/application/Espo/Core/Formula/Functions/StringGroup/LowerCaseType.php index fb832de99d..459f6a9776 100644 --- a/application/Espo/Core/Formula/Functions/StringGroup/LowerCaseType.php +++ b/application/Espo/Core/Formula/Functions/StringGroup/LowerCaseType.php @@ -53,6 +53,6 @@ class LowerCaseType extends \Espo\Core\Formula\Functions\Base $value = strval($value); } - return strtolower($value); + return mb_strtolower($value); } } \ No newline at end of file diff --git a/application/Espo/Core/Formula/Functions/StringGroup/SubstringType.php b/application/Espo/Core/Formula/Functions/StringGroup/SubstringType.php index 848042dd1d..b2f1aa0d32 100644 --- a/application/Espo/Core/Formula/Functions/StringGroup/SubstringType.php +++ b/application/Espo/Core/Formula/Functions/StringGroup/SubstringType.php @@ -1,4 +1,4 @@ -value) > 2) { $length = $this->evaluate($item->value[2]); - return substr($string, $start, $length); + return mb_substr($string, $start, $length); } else { - return substr($string, $start); + return mb_substr($string, $start); } } } \ No newline at end of file diff --git a/application/Espo/Core/Formula/Functions/StringGroup/UpperCaseType.php b/application/Espo/Core/Formula/Functions/StringGroup/UpperCaseType.php index 2b3e350a96..192933c9c1 100644 --- a/application/Espo/Core/Formula/Functions/StringGroup/UpperCaseType.php +++ b/application/Espo/Core/Formula/Functions/StringGroup/UpperCaseType.php @@ -53,6 +53,6 @@ class UpperCaseType extends \Espo\Core\Formula\Functions\Base $value = strval($value); } - return strtoupper($value); + return mb_strtoupper($value); } } \ No newline at end of file