|
|
@@ -216,12 +216,10 @@ class BaseService
|
|
|
if (!empty($image)) $len = 1024;
|
|
|
foreach ($array as $item) {
|
|
|
if (count($texts) > 1) $len = 4096;
|
|
|
- if (count($texts) == 0) {
|
|
|
+ if (count($texts) == 0 || strlen($texts[count($texts) - 1] . $item) > $len) {
|
|
|
$texts[] = $item;
|
|
|
- } else if (strlen($texts[count($texts) - 1] . $item) <= $len) {
|
|
|
- $texts[count($texts) - 1] .= $item;
|
|
|
} else {
|
|
|
- $texts[] = $item;
|
|
|
+ $texts[count($texts) - 1] .= $item;
|
|
|
}
|
|
|
}
|
|
|
|