Skip to content

Commit

Permalink
Merge pull request #1267 from RealJTG/bug/1266_profiler_explain_error
Browse files Browse the repository at this point in the history
Fix profiler explain error in SQLServerPlatform, OtherPlatform
  • Loading branch information
ostrolucky authored Nov 25, 2020
2 parents 74c3bab + 6d20de0 commit 3187d59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Controller/ProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ private function explainSQLitePlatform(Connection $connection, array $query): ar
}

/**
* @param mixed[] $query
*
* @return mixed[]
*/
private function explainSQLServerPlatform(Connection $connection, string $query): array
private function explainSQLServerPlatform(Connection $connection, array $query): array
{
if (stripos($query['sql'], 'SELECT') === 0) {
$sql = 'SET STATISTICS PROFILE ON; ' . $query['sql'] . '; SET STATISTICS PROFILE OFF;';
Expand All @@ -120,9 +122,11 @@ private function explainSQLServerPlatform(Connection $connection, string $query)
}

/**
* @param mixed[] $query
*
* @return mixed[]
*/
private function explainOtherPlatform(Connection $connection, string $query): array
private function explainOtherPlatform(Connection $connection, array $query): array
{
$params = $query['params'];

Expand Down

0 comments on commit 3187d59

Please sign in to comment.