Jump to content

Fatal PHP error after upgrading to PHP 7 : [] operator not supported ...

Recommended Posts


I've recently updated the PHP version of my host to 7.1. Everything went fine except my prestashop installation. I'm using prestashop 1.6, and the below message is shown in the error log:

PHP Fatal error:  Uncaught Error: [] operator not supported for strings in 
	C:\\prestashop\\classes\\db\\DbQuery.php:70\nStack trace:\n#0 
	C:\\prestashop\\classes\\ObjectModel.php(203): DbQueryCore->from('shop', 'a')\n#1 
	C:\\prestashop\\classes\\shop\\Shop.php(131): ObjectModelCore->__construct('1', NULL, NULL)\n#2 
	C:\\prestashop\\classes\\shop\\Shop.php(392): ShopCore->__construct('1')\n#3 
	C:\\prestashop\\config\\config.inc.php(97): ShopCore::initialize()\n#4 
	C:\\prestashop\\index.php(27): require('C:\\\\prestashop\\\\m...')\n#5 {main}\n  thrown in 
	C:\\prestashop\\classes\\db\\DbQuery.php on line 70

It appears that prestashop is trying to append an array item to a string in its core files. Is there any solution to this problem?

I'm on windows server 2008 R2, running PHP 7.1, MySQL 5.7, and Apache 2.4

Thanks are in orders.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More