Skip to content

Commit

Permalink
JSON encoding flags were not moved correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Sep 15, 2021
1 parent 39b3c61 commit b5e3cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ public function saveStateSync()
$this->logger->critical("Error creating temporary save state file, check filesystem");
return;
}
$state = json_encode($this->buildState());
if (!(@file_put_contents($filename, $state, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) === strlen($state) && rename($filename, $this->saveFileName))) {
$state = json_encode($this->buildState(), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
if (!(@file_put_contents($filename, $state) === strlen($state) && rename($filename, $this->saveFileName))) {
$this->logger->critical("Save state sync failed. {lasterror}", ['lasterror' => json_encode(error_get_last())]);
}
}
Expand Down Expand Up @@ -788,7 +788,7 @@ public function shutdown() {
}

/**
* Input processes are stopped. Shutdown any running actions (some may need to be flused)
* Input processes are stopped. Shutdown any running actions (some may need to be flushed)
*/
public function stop()
{
Expand Down

0 comments on commit b5e3cb1

Please sign in to comment.