Skip to content

Commit

Permalink
fix bug with parameters offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Bushulyak committed Aug 19, 2016
1 parent 7afc759 commit c45c554
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions PhpRbac/src/PhpRbac/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public function __construct($config = '')
if ((string)$config === 'unit_test') {
require_once dirname(dirname(__DIR__)) . '/tests/database/database.config';
} else {
$adapter = $config['adapter'] ?: "pdo_sqlite";
$host = $config['host'] ?: "localhost";
$user = $config['user'] ?: "root";
$pass = $config['pass'] ?: "";
$tablePrefix = $config['prefix'] ?: "phprbac_";
$dbname = $config['db_name'] ?: false;
$adapter = isset($config['adapter']) ? $config['adapter'] : "pdo_sqlite";
$host = isset($config['host']) ? $config['host'] : "localhost";
$user = isset($config['user']) ? $config['user'] : "root";
$pass = isset($config['pass']) ? $config['pass'] : "";
$tablePrefix = isset($config['prefix']) ? $config['prefix'] : "phprbac_";
$dbname = isset($config['db_name']) ? $config['db_name'] : false;

if(!$dbname){
throw new ConfigurationException("db_name",$config['db_name']);
Expand Down

0 comments on commit c45c554

Please sign in to comment.