• joehorntw

    (@joehorntw)


    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::query

    The 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.

    • This topic was modified 3 weeks ago by joehorntw.
    • This topic was modified 3 weeks ago by joehorntw.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.