Skip to content

Commit

Permalink
Fixed cloneRepository() error in PHP7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax authored Dec 3, 2019
1 parent eed45e3 commit b5e709f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ public static function cloneRepository($url, $directory = NULL, array $params =
}

$descriptorspec = array(
0 => array('pipe', 'r'), // stdout
1 => array('pipe', 'w'), // stdin
0 => array('pipe', 'r'), // stdin
1 => array('pipe', 'w'), // stdout
2 => array('pipe', 'w'), // stderr
);

Expand All @@ -797,7 +797,7 @@ public static function cloneRepository($url, $directory = NULL, array $params =
while (TRUE)
{
// Read standard output
$output = fgets($pipes[0], 1024);
$output = fgets($pipes[1], 1024);

if ($output)
{
Expand All @@ -813,7 +813,7 @@ public static function cloneRepository($url, $directory = NULL, array $params =
}

// We are done
if ((feof($pipes[0]) OR $output === FALSE) AND (feof($pipes[2]) OR $output_err === FALSE))
if ((feof($pipes[1]) OR $output === FALSE) AND (feof($pipes[2]) OR $output_err === FALSE))
{
break;
}
Expand Down

0 comments on commit b5e709f

Please sign in to comment.