Smart Crawl / WPMUDEV Interface Issues

This showed up ion the wordpress login page when redirected when trying to download from WPMUDEV dashboard and while trying to install Smart Crawl Manually. Do you have any idea what this code is telling me? I noticed that it relates to the Defender plugin. So, I suspect the issue is related to the fact that I followed WPMUDEV instructions on how to save wordpress in a new directory. ?????

Warning: count(): Parameter must be an array or an object that implements Countable in /home/hwempori/public_html/ori/wp-content/plugins/wp-defender/app/module/audit/controller/main.php on line 248

In the meantime, it appears to be the reason I can't install Smart Crawl or interface properly with WPMUDEV. Thank you for your time.

  • Kendall Cuellar
    • Flash Drive

    I looked up the file. I haven't changed it so it is the same as what you would have for defender in your files.
    public function triggerEventSubmit() {
    $data = WP_Helper::getArrayCache()->get( 'events_queue', array() );
    if ( count( $data ) ) {
    Audit_API::onCloud( $data );
    }
    }

    ///// This is line 248 if ( count( $data ) ) {

  • Predrag Dubajic
    • Support

    Hi Kendall,

    Can you try replacing this code:

    public function triggerEventSubmit() {
            $data = WP_Helper::getArrayCache()->get( 'events_queue', array() );
            if ( count( $data ) ) {
                Audit_API::onCloud( $data );
            }
        }

    With this one:

    public function triggerEventSubmit() {
            $data = WP_Helper::getArrayCache()->get( 'events_queue', array() );
            if ( is_array( $data ) && count( $data ) ) {
                Audit_API::onCloud( $data );
            }
        }

    That should do the trick and it's something that will be included in next Defender release.

    Let us know how it goes.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.