Skip to content

Commit

Permalink
Issue 3600 missing db connection (#3680)
Browse files Browse the repository at this point in the history
* Add validator of HTTP methods. Move list of http methods to separate method and add settings for it. Change twig template to generate the methods based on HTTP methods accrodingly

* Throw an exception with the message that DB connection can't be established
  • Loading branch information
LOBsTerr authored and jmolivas committed Jan 11, 2018
1 parent ec179ed commit a8acc09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Command/Debug/DatabaseTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ protected function execute(InputInterface $input, OutputInterface $output)

if ($table) {
$this->redBean = $this->getRedBeanConnection($database);
if (empty($this->redBean)) {
throw new \Exception(
sprintf(
$this->trans('commands.debug.database.table.messages.no-connection'),
$database
)
);
}
$tableInfo = $this->redBean->inspect($table);

$tableHeader = [
Expand Down

0 comments on commit a8acc09

Please sign in to comment.