Skip to content

Commit

Permalink
Merge pull request #10489 from pauliuspetronis/2.0.x
Browse files Browse the repository at this point in the history
[2.0.x] Fix bug #10484
  • Loading branch information
andresgutierrez committed Jun 8, 2015
2 parents f57be5f + 4f956b4 commit 3c7b039
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions phalcon/db/adapter/pdo.zep
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ abstract class Pdo extends Adapter
let options = [];
}

/**
* Check if the connection must be persistent
*/
if fetch persistent, descriptor["persistent"] {
if persistent {
let options[\Pdo::ATTR_PERSISTENT] = true;
}
unset descriptor["persistent"];
}

/**
* Check if the user has defined a custom dsn
*/
Expand All @@ -132,16 +142,6 @@ abstract class Pdo extends Adapter

let options[\Pdo::ATTR_ERRMODE] = \Pdo::ERRMODE_EXCEPTION;

/**
* Check if the connection must be persistent
*/
if fetch persistent, descriptor["persistent"] {
if persistent {
let options[\Pdo::ATTR_PERSISTENT] = true;
}
unset descriptor["persistent"];
}

/**
* Create the connection using PDO
*/
Expand Down

0 comments on commit 3c7b039

Please sign in to comment.