Ken преди 1 седмица
родител
ревизия
21dc03e912
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      app/Services/BaseService.php

+ 3 - 1
app/Services/BaseService.php

@@ -195,7 +195,9 @@ class BaseService
         $array = explode("\n", $text);
         $texts = [];
         foreach ($array as $item) {
-            if (count($texts) == 0 || strlen($texts[count($texts) - 1] . $item) <= 4096) {
+            if (count($texts) == 0) {
+                $texts[] = $item;
+            } else if (strlen($texts[count($texts) - 1] . $item) <= 4096) {
                 $texts[count($texts) - 1] .= $item;
             } else {
                 $texts[] = $item;