Support » Plugin: Strong Testimonials » PHP 7.2: error on form submit

  • Resolved WeePee

    (@weepee)


    Hi!

    I recently had to switch to PHP 7.2 and since then I get this error when trying to submit the testimonial form:

    Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/1258/htdocs/wordpress/wp-includes/post-template.php on line 284
    
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/1258/htdocs/wordpress/wp-includes/post-template.php:284) in /homepages/1258/htdocs/wordpress/wp-includes/pluggable.php on line 1223

    I also tested the form with PHP 7.0 (on a different server) and there it works. Both are using WordPress 5.0.3. Any suggestions?

    Edit: the testimonial seems to be submitted and created nonetheless.

    • This topic was modified 5 months, 1 week ago by  WeePee.
    • This topic was modified 5 months, 1 week ago by  WeePee.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    Thanks for the details. I develop and test in PHP 7.2 and do not get any warnings.

    It sounds like a conflict with your theme or another plugin. You will have to narrow it down by deactivating other plugins one by one and testing the form each time. If the warnings stop then it is a conflict with the last plugin deactivated. If the warnings continue with all other plugins deactivated, then it is a conflict with the theme.

    Once we identify the conflict I will try to devise a solution.

    Thanks for your fast response! However, I don’t think the problem is related to the plugins or theme, as I didn’t change them for a long time. I only switched the PHP version.

    I tried to switch back to PHP 7.0 and the error was gone. It also seems to work with PHP 7.1. Also, the development version of the site (which uses the same plugins) works fine with PHP7.0 on Ubuntu 16.04.

    I will stay with PHP 7.1 for now, as it’s supported until end of 2019…

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.