/** * Формирует отчет обо ошибке SQL запроса * * @param string $file * @param int $line * @param string $sql * @param string $error * * @return void */ public function errorReport($sql) { $raw = $this->prepareSqlListing($sql, $this->db->error); $data = ['message' => 'Component ' . $this->component . ': <b>' . $this->message . '</b>', 'error' => htmlSpecialChars($this->db->error), 'num' => $raw['num'], 'sql' => $raw['sql'], 'explain' => $this->explain, 'php' => $this->preparePhp(), 'file' => $this->file, 'line' => $this->line]; $this->view->createReport($data); die; }
/** * Формирует отчет обо ошибке SQL запроса * * @param string $file * @param int $line * @param string $sql * @param string $error * * @return void */ public function errorReport($trace, $sql, $error = '') { $raw = $this->prepareSqlListing($sql, $error); $data = ['message' => $this->message, 'file' => $trace[0]['file'], 'line' => $trace[0]['line'], 'error' => htmlSpecialChars($error), 'num' => $raw['num'], 'sql' => $raw['sql'], 'explain' => $this->explain, 'php' => $this->preparePhp($trace)]; $this->view->createReport($data); die; }