This commit is contained in:
2023-09-01 10:56:06 +08:00
parent ba68102405
commit 370c50f1fe
+3 -3
View File
@@ -390,9 +390,9 @@ class Connection extends Component
PDO::ATTR_TIMEOUT => $this->timeout, PDO::ATTR_TIMEOUT => $this->timeout,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES ' . $this->charset PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES ' . $this->charset
]); ]);
array_walk($this->attributes, function ($value, $key) use ($pdo) { foreach ($this->attributes as $key => $attribute) {
$pdo->setAttribute($key, $value); $pdo->setAttribute($key, $attribute);
}); }
return $pdo; return $pdo;
} }