1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

DibiMsSql2005Driver: default charset set to UTF-8

If charset is not specified in config, NULL is passed as connection option and 'Invalid value type for option CharacterSet was specified.  String type was expected.' is thrown.
This commit is contained in:
Miloslav Hůla
2013-04-10 11:08:31 +02:00
parent 2c9cbe9b0c
commit 8e5898a11b

View File

@@ -73,6 +73,9 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver, IDibiResult
$this->connection = $config['resource'];
} else {
// Default values
if (!isset($config['options']['CharacterSet'])) $config['options']['CharacterSet'] = 'UTF-8';
$this->connection = sqlsrv_connect($config['host'], (array) $config['options']);
}