Skip to content

Commit 57e95f3

Browse files
committed
Fix the detection of the Process new argument
1 parent 19ab889 commit 57e95f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function start(callable $callback = null/*, array $env = array()*/)
272272
} else {
273273
if (__CLASS__ !== static::class) {
274274
$r = new \ReflectionMethod($this, __FUNCTION__);
275-
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[0]->name)) {
275+
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[1]->name)) {
276276
@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);
277277
}
278278
}

0 commit comments

Comments
 (0)