Skip to content

Commit

Permalink
Fix the detection of the Process new argument
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Jul 9, 2018
1 parent 19ab889 commit 57e95f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function start(callable $callback = null/*, array $env = array()*/)
} else {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[0]->name)) {
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[1]->name)) {
@trigger_error(sprintf('The %s::start() method expects a second "$env" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED);
}
}
Expand Down

0 comments on commit 57e95f3

Please sign in to comment.