Skip to content

Commit

Permalink
Merge pull request pomm-project#44 from stood/feature-compatibility-p…
Browse files Browse the repository at this point in the history
…hp7.4

upgrade DatabaseCollector for Php7
  • Loading branch information
stood authored May 14, 2020
2 parents b335ba3 + 4050ac6 commit d05ff69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"license": "MIT",
"authors": [ { "name": "Grégoire HUBERT", "email": "[email protected]" }, { "name": "Jérôme MACIAS", "email": "[email protected]" } ],
"require": {
"php": ">=7.1",
"pomm-project/foundation": "~2.0",
"symfony/http-foundation": "~2.5|~3.0|~4.0|~5.0",
"symfony/http-kernel": "~2.5|~3.0|~4.0|~5.0",
Expand Down
4 changes: 2 additions & 2 deletions sources/lib/DatabaseDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function execute($name, $data, Session $session)
{
switch ($name) {
case 'query:post':
$this->data['time'] += $data['time_ms'];
$this->data['time'] += (float) $data['time_ms'];
$data += array_pop($this->data['queries']);
/* fall-through */
case 'query:pre':
Expand Down Expand Up @@ -87,7 +87,7 @@ private function watch($name)
/**
* {@inheritdoc}
*/
public function collect(Request $request, Response $response, \Exception $exception = null)
public function collect(Request $request, Response $response, \Throwable $exception = null)
{
if ($exception instanceof SqlException) {
$this->data['exception'] = $exception->getMessage();
Expand Down

0 comments on commit d05ff69

Please sign in to comment.