As of PHP 8, PDO::commit() and rollBack() will throw a There is no active transaction PDOException if the transaction had been autocommitted, as MySQL will do whenever a schema change is made. Previously they would fail silently.
Expected behavior
PW handle this with either a $db->setAttribute(PDO::ATTR_AUTOCOMMIT, 0); or a inTransaction() conditional for commit and rollback.
Short description of the issue
As of PHP 8, PDO::commit() and rollBack() will throw a There is no active transaction PDOException if the transaction had been autocommitted, as MySQL will do whenever a schema change is made. Previously they would fail silently.
Expected behavior
PW handle this with either a
$db->setAttribute(PDO::ATTR_AUTOCOMMIT, 0);
or ainTransaction()
conditional for commit and rollback.You can read more about it here: https://github.com/yiisoft/yii2/issues/18406 where they took the inTransaction check approach.
Actual behavior
Throws above exception
Optional: Screenshots/Links that demonstrate the issue
Setup/Environment
Server Details
Server Settings
|Parameter|Value| |------:|:-------| |allow_url_fopen|1| |max_execution_time|0 (changeable)| |max_input_nesting_level|64| |max_input_time|60| |max_input_vars|10000| |memory_limit|1024M| |post_max_size|35M| |upload_max_filesize|25M| |xdebug|| |xdebug.max_nesting_level|| |mod_rewrite|1| |mod_security|| |EXIF Support|1| |FreeType|1|GD Settings
|Parameter|Value| |------:|:-------| |Version|2.3.3| |GIF|1| |JPG|1| |PNG|1| |WebP|1| |AVIF|1|iMagick Settings
|Parameter|Value| |------:|:-------| |Version|6.9.11| |GIF|1| |JPG|1| |PNG|1| |SVG|1| |PDF|1| |WebP|1| |AVIF|1|Module Details
|Module ClassName|Version| |------:|:-------| |AdminOnSteroids|2.0.21| |AdminPageFieldEditLinks|3.1.6| |BatchChildEditor|1.8.27| |BreadcrumbDropdowns|0.3.11| |ConnectPageFields|0.3.5| |Duplicator|1.5.2| |FieldtypeAssistedURL|2.0.0| |FieldtypeColor|1.1.8| |FieldtypeFontIconPicker|2.0.2| |FieldtypeMapMarker|3.0.0| |FieldtypeRepeaterMatrix|0.1.1| |FieldtypeRuntimeOnly|0.1.8| |FieldtypeSeoMaestro|1.1.1| |FieldtypeTable|0.2.5| |FieldtypeVerifiedURL|0.0.6| |FileValidatorSvgSanitizer|0.0.5| |GoogleClientAPI|0.0.4| |ImportPagesCSV|1.0.8| |InputfieldAssistedURL|2.0.0| |InputfieldColor|1.1.6| |InputfieldFontIconPicker|2.0.2| |InputfieldMapMarker|3.0.0| |InputfieldRepeaterMatrix|0.1.1| |InputfieldSeoMaestro|1.1.1| |InputfieldTable|0.2.5| |MarkupFontIconPicker|2.0.2| |MarkupSitemap|0.8.2| |ModuleReleaseNotes|0.11.3| |ModuleSettingsImportExport|0.2.9| |PageEditSoftLock|1.0.1| |PageProtector|2.0.9| |PageRenameOptions|2.0.2| |PasswordForceChange|1.0.5| |ProcessAdminActions|0.9.4| |ProcessChangelog|1.16.1| |ProcessChangelogHooks|1.11.2| |ProcessChildrenCsvExport|1.8.24| |ProcessCustomUploadNames|1.3.4| |ProcessDatabaseBackups|0.0.6| |ProcessDuplicator|1.5.2| |ProcessHannaCode|0.3.2| |ProcessJumplinks|1.5.64| |ProcessLoginHistory|1.10.4| |ProcessLoginHistoryHooks|1.8.5| |ProcessPDFImageCreator|1.0.7| |ProcessPageEditSoftLock|1.0.1| |ProcessPageFieldSelectCreator|0.5.11| |ProcessSettingsFactory|1.0.7| |ProcessTableCsvExport|2.0.16| |ProcessTracyAdminer|1.1.3| |ProcessWireUpgrade|0.1.1| |ProcessWireUpgradeCheck|0.0.9| |RestrictTabView|1.3.1| |SeoMaestro|1.1.1| |SettingsFactory|1.0.7| |TableCsvImportExport|2.0.16| |TextformatterHannaCode|0.3.2| |TextformatterMarkExternalLinks|2.0.0| |TracyDebugger|4.25.21| |WireMailSmtp|0.6.4|