• Resolved Jan Jakeš

    (@janjakes)


    Hello!

    We’re testing the Wordfence plugin compatibility with the SQLite integration and WordPress Playground. Doing so, we’ve encountered the following error:

    PHP Fatal error: Uncaught Error: Call to undefined method WP_SQLite_Driver::prepare() in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php:883

    The issue here is that with SQLite, the $wpdb->dbh property doesn’t hold an instance of mysqli.

    As a hotfix, we can set WORDFENCE_ALLOW_DIRECT_MYSQLI to false, but for a more robust solution, I wanted to suggest adding an $wpdb->dbh instanceof mysqli check into the following condition on your side:

    $useMySQLi = (is_object($dbh) && (PHP_MAJOR_VERSION >= 7 || $wpdb->use_mysqli) && wfConfig::get('allowMySQLi', true) && WORDFENCE_ALLOW_DIRECT_MYSQLI);

    What do you think?
    Here’s an issue tracking this on the SQLite integration side: #284

    Thanks!
    Jan

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Thanks for your detailed suggestion @janjakes!

    I have forwarded this to our development and QA teams as a feature request, which can also be sent directly using feedback @ wordfence . com. Topics such as this will become marked as “Resolved” in the forum as we are unable to provide ongoing updates about development discussions, progress, or release dates.

    Our internal issue tracking will remain open for anything that is considered for a future plugin version. Our changelog will detail the changes made when new versions are released.

    Many thanks,
    Peter.

Viewing 1 replies (of 1 total)

The topic ‘SQLite and WordPress Playground compatibility’ is closed to new replies.