Unexpected ‘string’ (T_STRING) – upgrade on PHP7.3
-
HI,
I don’t believe this problem has been reported previously, apologies if it has.I just upgraded to WordPress 6.3.1, which went fine, and then I updated “Create Block Theme” to 1.13.2.
The plugin upgrade was green and reported no errors. However on refreshing the page the site was broken with “critical error on this website”
Looking at the logs, the error was:
[16-Sep-2023 21:14:05 UTC] PHP Parse error: syntax error, unexpected ‘string’ (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /srv/www/zoyinc/wp-content/plugins/create-block-theme/admin/create-theme/cbt-zip-archive.php on line 8
I edited cbt-zip-archive.php and changed line 8 from:
private string $theme_slug;
to
private $theme_slug;
My site is now back and working.
From the reading I have done it seems the fact that I am stuck on 7.3 is part of the problem. I do plan to fix this but not at the moment.
I am not a developer, so not proposing a solution but just letting you know.
For the moment I simply won’t update the plugin.
Cheers
- The topic ‘Unexpected ‘string’ (T_STRING) – upgrade on PHP7.3’ is closed to new replies.