Skip to content

Commit

Permalink
Bridges\Tracy\Panel: silenced PHP warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 27, 2016
1 parent bc56455 commit 9179719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dibi/Bridges/Tracy/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getPanel()
$backup = [$event->connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime];
$event->connection->onEvent = NULL;
$cmd = is_string($this->explain) ? $this->explain : ($event->connection->getConfig('driver') === 'oracle' ? 'EXPLAIN PLAN FOR' : 'EXPLAIN');
$explain = Helpers::dump($event->connection->nativeQuery("$cmd $event->sql"), TRUE);
$explain = Helpers::dump(@$event->connection->nativeQuery("$cmd $event->sql"), TRUE);
} catch (Dibi\Exception $e) {
}
list($event->connection->onEvent, \dibi::$numOfQueries, \dibi::$totalTime) = $backup;
Expand Down

6 comments on commit 9179719

@accgit
Copy link

@accgit accgit commented on 9179719 Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Davide, problém jsem vyřešil odstraněním FOR, nevím z jakého důvodu to tam bylo přidáno, ale takhle mi to funguje v pořádku.
$cmd = is_string($this->explain) ? $this->explain : ($event->connection->getConfig('driver') === 'oracle' ? 'EXPLAIN PLAN' : 'EXPLAIN');

@dg
Copy link
Owner Author

@dg dg commented on 9179719 Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podle dokumentace se tam to FOR používá, ale neznám Oracle. https://docs.oracle.com/cd/B19306_01/server.102/b14211/ex_plan.htm#i17492

@accgit
Copy link

@accgit accgit commented on 9179719 Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zítra ještě vyzkouším jednotlivé verze dibi a dám vědět.

@accgit
Copy link

@accgit accgit commented on 9179719 Jul 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tak jsem zjistil tohle, dibi od verze 3.0.1 - 3.0.5 na Nette 2.3.10 je naprosto v pořádku, problém to tedy dělá na Nette od verze 2.4 je možné, že by to mohla způsobovat Tracy?

@milo
Copy link
Collaborator

@milo milo commented on 9179719 Jul 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@accgit Ale s Nette 2.3 to výsledek EXPLAIN také pro ten INSERT neukáže, ne?

Jen nápad... nesouvisí to s Tracy a odchycováním poslední shut-up chyby?

@accgit
Copy link

@accgit accgit commented on 9179719 Jul 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nette 2.3.10 zobrazuje právě vše v pohodě,
kdežto Nette 2.4 zobrazí pouze INSERT a UPDATE dotaz.

Please sign in to comment.