Set up database factory to bail is no driver is defined
Solves the issue with having a site not using the built in PDO (case in point, I'm building a site entirely on Redis with a separate vendor library that isn't part of PICKLES)
This commit is contained in:
parent
344e685035
commit
bf95e07591
2 changed files with 14 additions and 2 deletions
|
@ -77,6 +77,12 @@ class Database extends Object
|
|||
if (isset($config->datasources[$name]))
|
||||
{
|
||||
$datasource = $config->datasources[$name];
|
||||
|
||||
if (!isset($datasource['driver']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$datasource['driver'] = strtolower($datasource['driver']);
|
||||
|
||||
if (!isset(self::$instances['Database'][$name]))
|
||||
|
|
6
jar.php
6
jar.php
|
@ -2276,6 +2276,12 @@ class Database extends Object
|
|||
if (isset($config->datasources[$name]))
|
||||
{
|
||||
$datasource = $config->datasources[$name];
|
||||
|
||||
if (!isset($datasource['driver']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$datasource['driver'] = strtolower($datasource['driver']);
|
||||
|
||||
if (!isset(self::$instances['Database'][$name]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue