You can change
foreach ( (array) $terms as &$_term ) {
to
foreach ( (array) $terms as $_term ) {
via FTP and check
I can confirm wpglobus 1.7.7 is broken. Error the same.
I successfully rolled back to 1.7.6 by manually installing the plugin downloaded from: https://github.com/WPGlobus/WPGlobus/releases/tag/1.7.6
@agriprom @bartcerneels
What version PHP are you using ?
-
This reply was modified 9 years, 4 months ago by
Alex Gor.
My hosting has PHP version 5.3.3
Thanks for asking the question, I had the same problem and changed to
foreach ( (array) $terms as $_term ) {
then it’s fixed!
@nana55
What version PHP are you using ?
@alexgff Thank you for your answer, I was really desperate how to fix this problem but now I am very happy that this works again, thank you so much!
@alexgff Mine is 5.3, should I change this to 5.6?
I’ve never changed the setting before.
Thanks for your advice in advance!
Thanks for the quick reply.
The PHP version is: 5.3.8-2.
I have installed the previous version of the plugin for now like @bartcerneels suggested, since I have not a lot of php experience.
@alexgff what is the best thing to do now?
-
This reply was modified 9 years, 4 months ago by
agriprom.
This is more than strange.
There is no & amp; in the source code.
https://plugins.svn.ww.wp.xz.cn/wpglobus/trunk/includes/class-wpglobus-filters.php
What I see is:
foreach ( (array) $terms as &$_term ) {
WPGlobus_Core::translate_term( $_term, WPGlobus::Config()->language );
}
-
This reply was modified 9 years, 4 months ago by
TIV.NET INC..
Sorry, I was looking via email, the there was & written as & amp;
The & was there from the very beginning. The new addition was (array) casting.
According to your reports, this might confuse older PHP versions (5.3).
Will check and issue a patch soon.
Thanks for your reports.
Confirmed: a combination of (array) and & causes a syntax error in old PHP.
Please check the patch 1.7.7.1