ciubotaru/share-on-diaspora

Parse error: syntax error, unexpected '['

ciubotaru opened this issue · 2 comments

OK, finally we have a real bug. As reported in three comments to this post on JoinDiaspora, a freshly installed version 0.3 fails with the following message:

Parse error: syntax error, unexpected '[' in /var/www/thomas-leister.de/thomas-leister.de/wp-content/plugins/share-on-diaspora/share-on-diaspora.php on line 52

Although I was unable to reproduce it on my blog, my understanding is that settings name 'my-settings' (blindly copied from some tutorial) conflicts with another plugin.

P.S.: If it's not just a name conflict, then life becomes more complicated

Although a possible name conflict was resolved in 0.3.1, I managed to reproduce the error on a hosting service (000webhost) running an old version of Wordpress (3.2.1) and old php (5.2.17).

It boiled down to "function array dereferencing" feature that was introduced only in PHP 5.4.0. Solved now.