Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Tracy bar #259

Closed
Lumeriol opened this issue Jun 12, 2020 · 1 comment
Closed

Error in Tracy bar #259

Lumeriol opened this issue Jun 12, 2020 · 1 comment

Comments

@Lumeriol
Copy link

Version: d9b5f29

Bug Description

With fix of #256 there is error in Tracy bar (Nette\Bridges\DatabaseTracy\ConnectionPanel)

Nette\InvalidArgumentException: Placeholder ?list expects array or Traversable object, integer given. in \vendor\nette\database\src\Database\SqlPreprocessor.php:290

Stack trace:

  1. \vendor\nette\database\src\Database\SqlPreprocessor.php(134): Nette\Database\SqlPreprocessor->formatValue(2, 'list')
  2. [internal function]: Nette\Database\SqlPreprocessor->callback('IN (?)')
  3. \vendor\nette\utils\src\Utils\Callback.php(81): preg_replace_callback('~'[^']*+'|"[^"]...', Object(Closure), 'EXPLAIN SELECT ...', -1)

By dumped data it looks that problem is with EXPLAIN statement, that not have array as parameter in added condition for IN operator:

0 => 'SELECT `id`, `use_options` FROM `user_role` WHERE (`id` IN (?))'
1 => array
    0 => 2

vs

0 => 'EXPLAIN SELECT `id`, `use_options` FROM `user_role` WHERE (`id` IN (?))'
1 => 2
@Lumeriol
Copy link
Author

Fixed by f016c33 and 45a940d.

Same error described on Nette Forum.

dg added a commit that referenced this issue Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant