After updating bootstrap, in error log it is showing syntax error at /themes/bootstrap/src/Plugin/Provider/ApiProviderBase.php 168. I am updating bootstrap theme manually not using composer.

CommentFileSizeAuthor
error_log.png13.96 KBdkmishra

Comments

Devendra Mishra created an issue. See original summary.

markhalliwell’s picture

Title: Site stopped working after updating bootstrap 8.x-3.17 to 8.x-3.19 » PHP Parse error: syntax error, unexpected '[' in ApiProviderBase.php
Version: 8.x-3.19 » 8.x-3.x-dev
Component: Theme Settings » Code
Issue tags: -bootstrap theme

The easiest solution will be for you to simply upgrade your PHP version to something newer than PHP 5.5.

Apparently, before PHP 5.6, characters from class constants weren't accessible via array notation.

Example, switch between PHP 5.5.34 and PHP 5.6.2:
http://sandbox.onlinephpfunctions.com/code/6a66c49786ced87e18ea92ab10ec9...

dkmishra’s picture

Hi @markcarver, my php version is already - 7.2.17.

markhalliwell’s picture

Then you shouldn't be seeing this error.

  • markcarver committed 44b9de5 on 8.x-3.x
    Issue #3059251 by markcarver, Devendra Mishra: PHP Parse error: syntax...

  • markcarver committed f6c3f0e on 8.x-4.x
    Issue #3059251 by markcarver, Devendra Mishra: PHP Parse error: syntax...
markhalliwell’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.