• Greetings,

    This is mostly an FYI …

    When saving a new sermon post I was receiving this error in the Apache error logs. The browser just reported a 500.
    PHP Fatal error: 'break' not in the 'loop' or 'switch' context in /var/www/olneybaptist.org/wp-content/plugins/sermon-manager-for-wordpress/includes/getid3/getid3.lib.php on line 285

    This happened when hitting the “Publish” or “Update” button. The post would save, but the sermon file location would not be attached to it completely so the player wouldn’t show on the front end. I commented out the line in the file (which was just a ‘break;’) and it started working again.

    Caveats:

    • I’m not a PHP developer.`
    • I’m using PHP 7, if that matters.
    • I’m mostly reporting this so this doesn’t break for me again in the next update ??

    Thanks,
    Daniel

    https://www.ads-software.com/plugins/sermon-manager-for-wordpress/

Viewing 1 replies (of 1 total)
  • 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: "https://www.domainname.org/wp-admin/post.php?post=1030&action=edit"

    Jacob

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal error’ is closed to new replies.