Skip to content

Commit 43ed597

Browse files
committed
Don't set MYSQL_ATTR_MULTI_STATEMENTS by default
Fixes #18474
1 parent 77b7c3a commit 43ed597

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Craft CMS 4
22

3+
## Unreleased
4+
5+
- The `PDO::MYSQL_ATTR_MULTI_STATEMENTS` attribute is no longer set by default for database connections. ([#18474](https://github.com/craftcms/cms/issues/18474))
6+
37
## 4.17.7 - 2026-02-24
48

59
- The `PDO::MYSQL_ATTR_MULTI_STATEMENTS` attribute is now set to `false` by default for database connections.

src/helpers/App.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use craft\web\User as WebUser;
3535
use craft\web\View;
3636
use HTMLPurifier_Encoder;
37-
use PDO;
3837
use ReflectionClass;
3938
use ReflectionProperty;
4039
use Symfony\Component\Process\PhpExecutableFinder;
@@ -925,10 +924,7 @@ public static function dbConfig(?DbConfig $dbConfig = null): array
925924
'commandMap' => [
926925
$driver => Command::class,
927926
],
928-
'attributes' => [
929-
PDO::MYSQL_ATTR_MULTI_STATEMENTS => false,
930-
...$dbConfig->attributes,
931-
],
927+
'attributes' => $dbConfig->attributes,
932928
'enableSchemaCache' => !static::devMode(),
933929
];
934930

0 commit comments

Comments
 (0)