Skip to content

Commit 742b00b

Browse files
committed
Check config for persist connection.
1 parent 1335033 commit 742b00b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Cartalyst/Sentry/Facades/CI/Sentry.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public static function createSentry()
6565
$ci->load->database();
6666

6767
// Let's connect and get the PDO instance
68-
$pdo = $ci->db->db_pconnect();
68+
$method = $ci->db->pconnect ? 'db_pconnect' : 'db_connect';
69+
$pdo = $ci->db->{$method}();
6970

7071
// Validate PDO
7172
if ( ! $pdo instanceof PDO)

0 commit comments

Comments
 (0)