Make sermon manager compatible with PHP7

Issue #69 resolved
Allen Cox created an issue

PHP7 beta is now stable and already some users are reporting that Sermon Manager does not function correctly when PHP7 is enabled.

Starting with: [Link Text] this forum user on the WP repository forum (Link URL) https://wordpress.org/support/topic/php7-support

His specific complaint is that sermon manager does not create new sermons. I've asked for further clarification.

Comments (3)

  1. Jacob

    Shalom,

    PHP 7 does not allow for "break" statements outside of for, foreach, or switch statements. This was permissible in PHP 5.x but will now throw a fatal error. The getid3.lib.php file in the included getid3 library has "break" statement that causes a fatal error at line 285. Came across this error when clients had issues embedding their audio files in "sermons". Eliminating line 285 led to normal function again.

    Error message:

    #!
    2016/07/25 12:20:51 [error] 22565#22565: *7144248 FastCGI sent in stderr: 
    "PHP message: PHP Fatal error:  'break' not in the 'loop' or 'switch' context in /chroot/home/domainname/public_html/wp-content/plugins/sermon-manager-for-wordpress/includes/getid3/getid3.lib.php on line 285" while reading response header from upstream, 
    client: 198.51.xxx.xxx, 
    server: domainname.org, 
    request: "POST /wp-admin/post.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "www.domainname.org", 
    referrer: "http://www.domainname.org/wp-admin/post.php?post=1030&action=edit"
    

    Thanks, Jacob M.N.

  2. Allen Cox reporter

    Thank you Jacob for the clarification. We are working now to overhaul SM in preparation for ver 2.0 which, among other important fixes, will be PHP 7 compliant. We will keep a look out for this part of the code.

    Again, thanks for the details...

  3. Log in to comment