#1226 Case logs history gets truncated if PHP < 5.4.9 and mbstring is present (only on branch 2.2.0)

SVN:2.2.0[3973]
This commit is contained in:
Romain Quetiez
2016-03-30 15:14:52 +00:00
parent ae7daa6e56
commit 9a190e69f6

View File

@@ -628,8 +628,9 @@ class CMDBChangeOpSetAttributeCaseLog extends CMDBChangeOpSetAttribute
if (function_exists('mb_strcut'))
{
// Safe with multi-byte strings
$sBefore = $this->ToHtml(mb_strcut($sTextEntry, 0, $iMaxVisibleLength, 'UTF-8'));
$sAfter = $this->ToHtml(mb_strcut($sTextEntry, $iMaxVisibleLength, null, 'UTF-8'));
mb_internal_encoding('UTF-8'); // Do not use the form mb_strcut(str, start, null, encoding) which does not work if PHP < 5.4.9 (null => 0)
$sBefore = $this->ToHtml(mb_strcut($sTextEntry, 0, $iMaxVisibleLength));
$sAfter = $this->ToHtml(mb_strcut($sTextEntry, $iMaxVisibleLength));
}
else
{