Skip to content

Error in Tracy bar #259

@Lumeriol

Description

@Lumeriol

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions