Skip to content

Commit

Permalink
Fix PDOException
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Griffiths committed Jun 12, 2017
1 parent 16012d6 commit 8ab042e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/core/Database.php
Expand Up @@ -16,7 +16,7 @@ class Database
* the configuration file.
*
* @param array $config
* @return PDO
* @return PDO|bool
*/
public function connection(array $config)
{
Expand All @@ -29,7 +29,7 @@ public function connection(array $config)
$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$instance->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
return $instance;
} catch (PDOException $e) {
} catch (\PDOException $e) {
die($e->getMessage());
}
}
Expand All @@ -38,7 +38,7 @@ public function connection(array $config)
* Load the configuration.
*
* @param array $config
* @return PDO
* @return string
*/
public function loadConfig(array $config)
{
Expand Down

0 comments on commit 8ab042e

Please sign in to comment.