Latest version check breaks plugin
-
Using versions:
– WordPress: 4.9.6
– Contact Form 7: 5.0.2
– Material Design for Contact Form 7 (Premium): 1.7.6Receiving error:
[07-Jun-2018 21:40:54 UTC] PHP Parse error: syntax error, unexpected '[' in /home/***/public_html/wp-content/plugins/material-design-for-contact-form-7-premium/public/cf7-material-design-public.php on line 422
Relevant line is:
$cf7v5_class = intval( WPCF7_VERSION[0] ) >= 5 ? 'cf7md-is-wpcf7v5 ' : '';
Fix is to change line to:
$cf7v5_class = version_compare( WPCF7_VERSION, '5.0.0', '>=') ? 'cf7md-is-wpcf7v5 ' : '';
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Latest version check breaks plugin’ is closed to new replies.