Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 5.4:
  Mitigate PHPUnit deprecations
  [TwigBundle] Add support for resetting globals between HTTP requests
  [Validator] Add Catalan and Spanish translation for `Week` constraint
  Don't use is_resource() on non-streams
  [Ldap] Fix extension deprecation
  • Loading branch information
derrabus committed Sep 8, 2024
2 parents 8d92dd7 + 32354f6 commit 8c567a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function start(?callable $callback = null, array $env = [])

$process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);

if (!\is_resource($process)) {
if (!$process) {
throw new RuntimeException('Unable to launch a new process.');
}
$this->process = $process;
Expand Down Expand Up @@ -1400,8 +1400,9 @@ private function readPipes(bool $blocking, bool $close): void
private function close(): int
{
$this->processPipes->close();
if (\is_resource($this->process)) {
if ($this->process) {
proc_close($this->process);
$this->process = null;
}
$this->exitcode = $this->processInformation['exitcode'];
$this->status = self::STATUS_TERMINATED;
Expand Down

0 comments on commit 8c567a2

Please sign in to comment.