|
@@ -94,9 +94,8 @@ class MySQL implements DatabaseInterface {
|
94
|
94
|
|
95
|
95
|
public function connect($hostname,$username,$password,$database,$port,$socket,$charset) {
|
96
|
96
|
$db = mysqli_init();
|
97
|
|
- $option = constant('MYSQLI_OPT_INT_AND_FLOAT_NATIVE');
|
98
|
|
- if ($option!==null && !mysqli_options($db,$option,true)) {
|
99
|
|
- throw new \Exception('Error setting int and float native. '.mysqli_error($db));
|
|
97
|
+ if (defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) {
|
|
98
|
+ mysqli_options($db,MYSQLI_OPT_INT_AND_FLOAT_NATIVE,true);
|
100
|
99
|
}
|
101
|
100
|
$success = mysqli_real_connect($db,$hostname,$username,$password,$database,$port,$socket,MYSQLI_CLIENT_FOUND_ROWS);
|
102
|
101
|
if (!$success) {
|