Thread Starter
Redpik
(@redpik)
OK, I understand.
It’s the new array syntax (since PHP 5.4).
I’m on a PHP 5.3 server.
Edit the file:
/wp-content/plugins/xml-sitemap-feed/includes/class-xmlsitemapfeed.php
Find:
$allowed = ['zh-cn','zh-tw'];
Change to:
$allowed = array('zh-cn','zh-tw');
doesn’t work
it generates an error and the “,” is highlighted as not expected
I changed php version to 5.4.45 and the plugin doesn’t work…
Please paste the code that changed. Probably a mistake when changing.
no errors, I typed it three times…
rafaljen, thanks for the fix. I just changed line 703 and the plugin activated OK.
My bad! A PHP 5.3 (and below) compatible version is being released right now… My apologies to all that are still on 5.3
Please note it is strongly advised to move to 5.4+ if possible because 5.3 has reached en of life in 2014 and is no longer supported. But if that’s not possible due to your hosting provider, the new plugin update should work for you.
Same problem, same solution:
$allowed = [‘zh-cn’,’zh-tw’];
Change to:
$allowed = array(‘zh-cn’,’zh-tw’);
Many Thanks
@ YS3F this should be fixed in the latest .1 release. Are you using 4.7 and does WordPress tell there is a newer version?