diff --git a/src/Orchestration/Adapter/DockerAPI.php b/src/Orchestration/Adapter/DockerAPI.php index 056af31..3504f3c 100644 --- a/src/Orchestration/Adapter/DockerAPI.php +++ b/src/Orchestration/Adapter/DockerAPI.php @@ -139,12 +139,12 @@ protected function streamCall(string $url, int $timeout = -1): array return 0; } - $originalSize = \mb_strlen($str); + $originalSize = \strlen($str); - while (! empty($str)) { + while (\strlen($str) > 0) { if ($isHeader) { $header = \unpack('Ctype/Cfill1/Cfill2/Cfill3/Nsize', $str); - $str = \mb_strcut($str, 8, null); + $str = \substr($str, 8, null); $isHeader = false; $currentHeader = $header; } else { @@ -152,8 +152,8 @@ protected function streamCall(string $url, int $timeout = -1): array $type = $currentHeader['type']; if (\strlen($str) >= $size) { - $currentData .= \mb_substr($str, 0, $size); - $str = \mb_strcut($str, $size, null); + $currentData .= \substr($str, 0, $size); + $str = \substr($str, $size, null); $isHeader = true; $currentHeader = null; @@ -164,7 +164,7 @@ protected function streamCall(string $url, int $timeout = -1): array } $currentData = ''; } else { - $currentHeader['size'] -= \mb_strlen($str); + $currentHeader['size'] -= \strlen($str); $currentData .= $str; $str = ''; }