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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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