Fix the detection of the Process new argument

This commit is contained in:
Christophe Coevoet 2018-07-09 11:01:07 +02:00
parent 19ab889ed6
commit 57e95f3f9a
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ class Process implements \IteratorAggregate
} 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);
}
}