I’m running EE 3.1.2 & I have installed the SEO Lite add on.
After I installed it on a particular site, when I go to the add on manager and then to the configuration options I get this error:
Parse error: syntax error, unexpected '[' in /home/stpcomm/public_html/roundtablelearning/system/user/addons/seo_lite/views/index.php on line 42
The Add-on seems to run fine otherwise, But I would like to tweak it a bit.
Odd thing is, I have this running on a different site - same EE version - and DON’T get the error.
I have tried uninstalling & re installing with no luck.
I looked at the line of code the error references & it is this line…
<?=form_open($save_settings_url, ['class' => 'settings'])?>
Has anyone experienced this?
Thanks. Russ
Assuming you changed all of the <?= to <?php echo then yes. However, I’ve just noticed that line 42 of the file you mentioned has an array that uses the short syntax:
['class' => 'settings']
Short syntax arrays were introduced in PHP 5.4, so if your version of PHP is older than that you’ll need to convert short syntax arrays to standard syntax, e.g.
array('class' => 'settings')
Better still, if you’re on an older version of PHP then you should upgrade, because versions of PHP <5.5 are no longer supported.
Thanks for the reply… I have noticed that the difference in the 2 installations I’m running of EE is the PHP version… the one that works as expected is on > 5.4 so I’m looking at the upgrade for the other installation, but I need to review my other sites to make sure they are all using newer frameworks (as I think they do) that support it.
Thanks again.
R
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.