Nette\InvalidArgumentException

There are more placeholders than passed parameters. search►

Source file

File: .../nette/database/src/Database/SqlPreprocessor.php:89

79: return [implode(' ', $res), $this->remaining]; 80: } 81: 82: 83: /** @internal */ 84: public function callback($m) 85: { 86: $m = $m[0]; 87: if ($m[0] === '?') { // placeholder 88: if ($this->counter >= count($this->params)) { 89: throw new Nette\InvalidArgumentException('There are more placeholders than passed parameters.'); 90: } 91: return $this->formatValue($this->params[$this->counter++], substr($m, 1) ?: 'auto'); 92: 93: } elseif ($m[0] === "'" || $m[0] === '"' || $m[0] === '/' || $m[0] === '-') { // string or comment

Call stack

  1. inner-code Nette\Database\SqlPreprocessor->callback(arguments)

    $m
    "?"
    
  2. .../vendor/nette/utils/src/Utils/Callback.php:98 source  preg_replace_callback(arguments)

    88: if ($file === __FILE__) { 89: $msg = preg_replace("#^$function\(.*?\): #", '', $message); 90: if ($onError($msg, $severity) !== FALSE) { 91: return; 92: } 93: } 94: return $prev ? $prev(...func_get_args()) : FALSE; 95: }); 96: 97: try { 98: return $function(...$args); 99: } finally { 100: restore_error_handler(); 101: } 102: }
    $regex
    "~'[^']*+'|"[^"]*+"|\?[a-z]*|^\s*+(?:INSERT|REPLACE)\b|\b(?:SET|WHERE|HAVING|ORDER BY|GROUP BY|KEY UPDATE)(?=\s*\z|\s*\?)|/\*.*?\*/|--[^\n]*~si" (142)
    
    $callback
    
    
    $subject
    "SELECT `attach`.* FROM `attach` LEFT JOIN `attachTypeRel` ON `attach`.`id` = `attachTypeRel`.`attachId` LEFT JOIN `attachType` ON `attachTypeRel`.`att ... " (261)
    
    $limit
    -1
    
  3. .../vendor/nette/utils/src/Utils/Strings.php:605 source  Nette\Utils\Callback::invokeSafe(arguments)