Error: Cannot use a scalar value as an array

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
alesconti
Posts: 11
Joined: 24 Feb 2021, 12:55

Error: Cannot use a scalar value as an array

Post by alesconti » 27 Feb 2021, 12:12

I have now website on nginx and php 8.0 environment.
I used composer to install complete package without problems.

Now when i'm try to open demo product a receive the following error:
Symfony\Component\Debug\Exception\FatalThrowableError
Cannot use a scalar value as an array
----
Aimeos\MShop\Index\Manager\Attribute\Standard::__construct
vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Index/Manager/Attribute/Standard.php:79

Do you know why ?

User avatar
aimeos
Administrator
Posts: 7922
Joined: 01 Jan 1970, 00:00

Re: Error: Cannot use a scalar value as an array

Post by aimeos » 27 Feb 2021, 12:53

The line seems to be uncritical:
https://github.com/aimeos/aimeos-core/b ... rd.php#L79

In the class it's also an array:
https://github.com/aimeos/aimeos-core/b ... hp#L34-L47

This seems like a bug in PHP 8 and when using PHP 8.0.2, I currently get a segmentation fault so that PHP version doesn't seem to work at all for Laravel/Aimeos.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

alesconti
Posts: 11
Joined: 24 Feb 2021, 12:55

Re: Error: Cannot use a scalar value as an array

Post by alesconti » 27 Feb 2021, 13:25

Downgraded my server to php 7.4
Thanks for the support !

Post Reply