Skip to content

Commit

Permalink
fix: JSON_UNESCAPED_UNICODE
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 23, 2024
1 parent d9d0837 commit df9ec71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/Actions/CoolifyTask/RunRemoteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function decodeOutput(?Activity $activity = null): string
$decoded = json_decode(
data_get($activity, 'description'),
associative: true,
flags: JSON_THROW_ON_ERROR
flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE
);
} catch (\JsonException $exception) {
return '';
Expand Down Expand Up @@ -164,7 +164,7 @@ protected function elapsedTime(): int

public function encodeOutput($type, $output)
{
$outputStack = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR);
$outputStack = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);

$outputStack[] = [
'type' => $type,
Expand All @@ -174,12 +174,12 @@ public function encodeOutput($type, $output)
'order' => $this->getLatestCounter(),
];

return json_encode($outputStack, flags: JSON_THROW_ON_ERROR);
return json_encode($outputStack, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
}

protected function getLatestCounter(): int
{
$description = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR);
$description = json_decode($this->activity->description, associative: true, flags: JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
if ($description === null || count($description) === 0) {
return 1;
}
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/ServerStatusJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function handle()
}
private function check_docker_engine()
{
ray('Checking Docker Engine');
$version = instant_remote_process([
"docker info",
], $this->server, false);
Expand Down

0 comments on commit df9ec71

Please sign in to comment.