Skip to content

Commit

Permalink
fixed error with PDO::MYSQL_ATTR_COMPRESS when mysqlnd is compiled in
Browse files Browse the repository at this point in the history
  • Loading branch information
WanWizard committed Sep 10, 2012
1 parent f872c61 commit 250482b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/database/pdo/connection.php
Expand Up @@ -77,7 +77,7 @@ public function connect()
$attrs[\PDO::ATTR_PERSISTENT] = true;
}

if (in_array(strtolower($this->_db_type), array('mysql', 'mysqli')) and $compress)
if (in_array(strtolower($this->_db_type), array('mysql', 'mysqli')) and $compress and defined(\PDO::MYSQL_ATTR_COMPRESS))
{
// Use client compression with mysql or mysqli (doesn't work with mysqlnd)
$attrs[\PDO::MYSQL_ATTR_COMPRESS] = true;
Expand Down

0 comments on commit 250482b

Please sign in to comment.