forked from Wavyzz/dolibarr
@@ -4825,8 +4825,8 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
|||||||
} elseif ($trunc == 'middle') {
|
} elseif ($trunc == 'middle') {
|
||||||
$newstring = dol_textishtml($string) ? dol_string_nohtmltag($string, 1) : $string;
|
$newstring = dol_textishtml($string) ? dol_string_nohtmltag($string, 1) : $string;
|
||||||
if (dol_strlen($newstring, $stringencoding) > 2 && dol_strlen($newstring, $stringencoding) > ($size + 1)) {
|
if (dol_strlen($newstring, $stringencoding) > 2 && dol_strlen($newstring, $stringencoding) > ($size + 1)) {
|
||||||
$size1 = round($size / 2);
|
$size1 = (int) round($size / 2);
|
||||||
$size2 = round($size / 2);
|
$size2 = (int) round($size / 2);
|
||||||
return dol_substr($newstring, 0, $size1, $stringencoding).'…'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size2, $size2, $stringencoding);
|
return dol_substr($newstring, 0, $size1, $stringencoding).'…'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size2, $size2, $stringencoding);
|
||||||
} else {
|
} else {
|
||||||
return $string;
|
return $string;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ parameters:
|
|||||||
- '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#'
|
- '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#'
|
||||||
- '# getLocalTaxesFromRate expects int\|string#'
|
- '# getLocalTaxesFromRate expects int\|string#'
|
||||||
- '#::(options)\(\) expects int\|string#'
|
- '#::(options)\(\) expects int\|string#'
|
||||||
- '# (print_barre_liste|dol_substr) expects int\|null#'
|
- '# print_barre_liste expects int\|null#'
|
||||||
- '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#'
|
- '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#'
|
||||||
- '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|literalBarcodeType)\(\) expects int, string#'
|
- '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|literalBarcodeType)\(\) expects int, string#'
|
||||||
- '#on array{url: mixed} in empty\(\) does not exist.#'
|
- '#on array{url: mixed} in empty\(\) does not exist.#'
|
||||||
|
|||||||
Reference in New Issue
Block a user