Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    We are on WordPress 4.9.8. I’m not sure if @vimalfzr is having the same issue we are, but upon updating the plugin we also had a 500 error take down our site. Inspecting the debug.log file indicated that usage of the PHP function ‘boolval’ was the culprit. This function has been available since PHP >= 5.5 and our site is still on PHP 5.4.

    A workaround would be to change the check in the file ‘cf7-material-design.php’ on line 131:

    
        if (function_exists('boolval')) {
            $upgraded = boolval( get_option( 'cf7md_options[upgraded_from_v1]' ) );
        } else {
            $upgraded = (bool)( get_option( 'cf7md_options[upgraded_from_v1]' ) );
        }
    

    The above is just an example. A check as you see fit would be sufficient. Thanks for your time.

    • This reply was modified 7 years, 7 months ago by dakao.
    Thread Starter dakao

    (@dakao)

    Hi Angus (@contactform7addons),

    We’re using the following for PHP:

    PHP 5.4.45 (cgi-fcgi) (built: Apr  1 2017 01:24:42)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

    I did some further testing and it looks like the method for indexing used isn’t supported until PHP 5.6.

    I have the following versions of PHP compiled locally:

    php-5.5.38  php-5.6.30  php-7.0.17  php-7.1.3
    
    $ find php-*/dist/bin -name php -exec {} -r "define( 'TEST_VERSION', '5.0.2'); echo 'PHP '.phpversion().' yields '.TEST_VERSION[0].PHP_EOL;" \;
    
    Parse error: syntax error, unexpected '[', expecting ',' or ';' in Command line code on line 1
    PHP 5.6.30 yields 5
    PHP 7.0.17 yields 5
    PHP 7.1.3 yields 5
    

    Thanks for getting that fixed! Much appreciated

Viewing 2 replies - 1 through 2 (of 2 total)