Error when I click on Extend concreete5

Permalink
syntax error, unexpected '[', expecting ')'

This is the only thing on the page along with a link to return to the home page that is displayed after selecting Extend concreete5. It doesn't say where the error is coming from or not even a hint as to what is causing it. I first experienced this after downloading a theme from the marketplace.

ThomasJ
View Replies:
hutman replied on at Permalink Reply
hutman
Do you have debugging output turned on?

This looks like it would be an array defined with [] and you having a version of PHP that doesn't support arrays done that way.
ThomasJ replied on at Permalink Reply
ThomasJ
Thanks for this response. The reason that I installed 5.7.4 instead of 8. is because that would require me to upgrade my php version to 5.5.9 and I am not prepared at this time to deal with all the problems that could cause across my other works. When I downloaded 5 7.4, it said that it needed php v5.5.3 and up. I am now running 5.5.3. Did someone recently update a file in Extends and forget the php compatibility issue or could it be the theme I downloaded is not 5.7.4 compatable?
hutman replied on at Permalink Reply
hutman
It's possible it's in the theme, if you haven't installed the theme you could manually delete the theme files from your server and see if the error goes away. The bracket array syntax should work with anything over PHP 5.4 though.

Do you have the debug output turned on? That should tell you the file causing the error.
ThomasJ replied on at Permalink Reply
ThomasJ
I have several sites that are active on the server that are built with c5.6 and therefore debugging is turned off. I will remove the theme and see if that is what's causing the error.
hutman replied on at Permalink Reply
hutman
When I ask about debugging I mean the settings in Dashboard -> System & Settings -> Debug Settings - if you have the "Output error information to site users" it will show you the file that is causing the error.

Don't remove the package if you've already installed it or you will break other things on your site.
ThomasJ replied on at Permalink Reply
ThomasJ
I turned concrete's debug on and this is what the error is. Basically, the theme's author along with all the marketplace testers that passed the theme didn't consider that they needed to be testing this work with the prescribed version of PHP that 5.7.4 is designated to work with.
syntax error, unexpected '[', expecting ')'

/var/www/html/pennyspetals/packages/theme_palette/controller.php

BlockTypeSet::add('theme_palette','Palette', $pkg);
BlockType::installBlockTypeFromPackage('palette_heading_option', $pkg);
BlockType::installBlockTypeFromPackage('palette_horizontal_rule', $pkg);
PageTheme::add('palette', $pkg);

if ( compat_is_version_8() ) {
$em = \ORM::entityManager();
$small = $em->getRepository('\Concrete\Core\Entity\File\Image\Thumbnail\Type\Type')->findOneBy(['ftTypeHandle' => 'small']);

}
mesuva replied on at Permalink Reply
mesuva
I would check that you are running PHP5.4 or above.
The error message here is one you'd see with the short array syntax use when running PHP5.3