symfony/symfony — pull request #9062 by fabriceb (2013-09-18 06:43:16+00:00)
Title: [HttpKernel] fixes RequestDataCollector bug, visible on Drupal8

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

In Drupal8 ```$request->attributes->all()``` returns an array with a 0 key whose value is the ```Drupal\user\Entity\User```

```php
array(
0 => Drupal\user\Entity\User,
...
)
```

```('_route' == $key && is_object($value))``` is therefore true which provokes an exception:

```php
FatalErrorException: Error: Call to undefined method Drupal\user\Entity\User::getPath() in [...]/RequestDataCollector.php line 54
```

This patch corrects this with a simple replacement of == by ===