Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • This isn’t due to the version of php, this is a clear Syntax Error.

    To anyone wanting a quick fix, change line 712 to:

    if(!empty($Feed[‘itunes_cat_’.$i]) && empty($Feed[‘apple_cat_’.$i])) {

    The first empty() call had its closing parenthesis at the end of the statement and not where it should be – before the &&.

    If newer versions of PHP don’t flag this as a syntax error, then at the very least the code will not do what you’d expect in this case.

    To the author, please set up continous integration that runs syntax checking against the code before doing releases – a lot of people have automatic updates and their whole site breaks as a result.

    For me, it’s

    PHP Fatal error: Can’t use function return value in write context in htdocs/wp-content/plugins/xml-sitemap-feed/controllers/class.xmlsf-sitemap.php on line 93

    plugin version is 5.2

    the offending line is
    if ( ! empty( get_post_meta( $post->ID, ‘_xmlsf_exclude’ ) ) ) return;

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