Skip to content

Commit

Permalink
persistent connections working again (if not using HHVM)
Browse files Browse the repository at this point in the history
ref: #1225
  • Loading branch information
prgTW committed Nov 11, 2016
1 parent 58d57ad commit 16e8110
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Propel/Runtime/Connection/PdoConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public function __construct($dsn, $user = null, $password = null, array $options

parent::__construct($dsn, $user, $password, $pdoOptions);

$this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['\Propel\Runtime\Adapter\Pdo\PdoStatement', []]);
if (defined('HHVM_VERSION')) {
$this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['\Propel\Runtime\Adapter\Pdo\PdoStatement', []]);
}
$this->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
}

Expand Down

0 comments on commit 16e8110

Please sign in to comment.