• Resolved Oclair

    (@oclair)


    Thanks for the great plugin!

    Nice, thanks for telling us to go to some website looking for a means when there is not; to interact with the community using and developing this software. There is a reason that WordPress provides this forum, even if it’s not always convenient.

    Oh yea btw,
    On Contact Form 7 MailChimp Extension
    Version 0.4.48 with WP 4.9.1

    You have an error in your php syntax!
    Warning: max(): Array must contain at least one element in /usr/local/www/dancingshiva-webshopfreshDS/wp-content/plugins/contact-form-7-mailchimp-extension/lib/tools.php on line 119

    Your welcome!
    OC

    • This topic was modified 6 years, 3 months ago by Oclair.
    • This topic was modified 5 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • I Fixed this:
    Open: wp-content/plugins/contact-form-7-mailchimp-extension/lib/system.php

    Comment out from line 86 to 126
    (Above this text: “// Get plugins that have an update”
    and before this text: “if( is_multisite()”

    Plugin Author Renzo

    (@rnzo)

    Please contact support: https://renzojohnson.com/

    Your form was malfunctioning just as all of ours. Your site even now seems to be timing out. I tried contacting you even in github and you were just MIA

    Well, just bumped into this warning as well. Would be better to solve the issue with the empty array though, not by commenting out a whole bunch of lines in system.php. Hope the author will update the code with a fix soon.

    NB Turning on debugging leads to error 500 and the following:

    `
    [error] 1562#1562: *19903 FastCGI sent in stderr: “PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /srv/www/staging.domain.com/releases/date/web/app/plugins/contact-form-7-mailchimp-extension/lib/system.php on line 92” (PHP 7.2 setup)
    `

    • This reply was modified 5 years, 11 months ago by Rhand.
    • This reply was modified 5 years, 11 months ago by Rhand.
    • This reply was modified 5 years, 11 months ago by Rhand.

    @amayita – your solution to delete the lines worked.
    Amazing. Thanks

    • This reply was modified 5 years, 10 months ago by abdulat.

    We just had this error again:

    2018/07/08 03:34:21 [error] 1564#1564: *1886 FastCGI sent in stderr: "PHP message: PHP Warning:  max(): Array must contain at least one element in /srv/www/domain.com/releases/20180522165351/web/app/plugins/contact-form-7-mailchimp-extension/lib/tools.php on line 119" while reading response header from upstream, client: xxx.158.74.5, server: domain.com, request: "GET /en/bla-bla/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "domain.com"
    2018/07/08 03:34:27 [error] 1564#1564: *1891 FastCGI sent in stderr: "PHP message: PHP Warning:  max(): Array must contain at least one element in /srv/www/domain.com/releases/20180522165351/web/app/plugins/contact-form-7-mailchimp-extension/lib/tools.php on line 119" while reading response header from upstream, client: xxx.69.70.193, server: domain.com, request: "HEAD /en/?noredirect=en_GB HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "domain.com", referrer: "http://domain.com"

    And this warning caused an error. It refers to the function

    
    function mc_get_latest_item(){
        $args = array(
                'post_type'         => 'wpcf7_contact_form',
                'posts_per_page'    => -1,
                'fields'            => 'ids',
            );
        // Get Highest Value from CF7Forms
        $form = max(get_posts($args));
        $out = '';
        if (!empty($form)) {
            $out .= $form;
        }
        return $out;
    }
    

    and line 119 $form = max(get_posts($args));

    • This reply was modified 5 years, 9 months ago by Rhand.

    Why doesn’t @rnzo implement something like:if (!empty($args)) {}?

    • This reply was modified 5 years, 9 months ago by Rhand.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with plugin’ is closed to new replies.