Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Showcase Questions /

Feedback and questions about sites in the Community Showcase.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Fatal error: 'continue' operator with non-constant operand is no longer supported


Go to End


2 Posts   5928 Views

Avatar
SL

Community Member, 1 Post

8 February 2015 at 12:04pm

I am duplicating an existing website done in SilverStripe to be used on another domain (edited content as required).

When uploading the files which currently work on one domain, I get this error:

Fatal error: 'continue' operator with non-constant operand is no longer supported in /var/www/vhosts/getfit.school.nz/httpdocs/home/sapphire/core/ManifestBuilder.php on line 201

I found one forum that said to split the code across two lines to look like this

// locate and include the exclude files
$topLevel = scandir($baseDir);
foreach($topLevel as $file) {
- if($file[0] == '.') continue
+ if($file[0] == '.') {
+ continue;
+ }

$fullPath = '';
$fullPath = $baseDir . '/' . $file;

However that did not work...... any solutions?

Avatar
martimiz

Forum Moderator, 1391 Posts

11 February 2015 at 1:39am

Edited: 11/02/2015 1:43am

This is not really the right section for this question , so I guess that's why we overlooked it...

I suppose you are on SilverStripe 2.4? That version doesn't really support PHP 5.4 or higher, so in that case the best thing would be to downgrade to PHP 5.3 (and flush your cache).

Edit: I found the forum post you mention, I think... Note: you dindn't just copy that, with the plusses and all? Stupid question, i know, but just to make sure? :)