merged branch tystr/sanitize_queries_fix (PR #3032)
Commits
-------
261325d
Cast $query['params'] to array to ensure it is a valid argument for the foreach.
Discussion
----------
[DoctrineBridge] Account for $query['params'] being null in DoctrineDataCollector's sanitizeQueries method
I was getting this error because inside the sanitizeQueries method of DoctrineDataCollector, there's no handling for $query['params'] being null.
ErrorException: Warning: Invalid argument supplied for foreach() in .../vendor/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php line 91
This commit is contained in:
commit
2a33fbdd16
@ -88,7 +88,7 @@ class DoctrineDataCollector extends DataCollector
|
||||
private function sanitizeQueries($queries)
|
||||
{
|
||||
foreach ($queries as $i => $query) {
|
||||
foreach ($query['params'] as $j => $param) {
|
||||
foreach ((array)$query['params'] as $j => $param) {
|
||||
$queries[$i]['params'][$j] = $this->varToString($param);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user