DbCache_WpdbInjection_QueryCaching try to cache ‘BEGIN’ query
-
Hello,
I installed a WordPress plugin which triggered an error, and here is the stacktrace :
TypeError:mysqli_num_fields(): Argument #1 ($result) must be of type mysqli_result, true given#0 /wp-includes/class-wpdb.php(3876): mysqli_num_fields#1 /wp-includes/class-wpdb.php(3876): wpdb::load_col_info#2 /wp-includes/class-wpdb.php(785): wpdb::__get#3 /wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(230): W3TC\DbCache_WpdbInjection_QueryCaching::query#4 /wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php(216): W3TC\DbCache_WpdbNew::queryThe executed code of that plugin is :
$wpdb->query( 'BEGIN' );Could you please improve the following code ( in DbCache_WpdbInjection_QueryCaching.php ) ?
if ( preg_match( '~^\s*start transaction\b~is', $query ) ) {Thank you.
You must be logged in to reply to this topic.