Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Unsupported operand types: array + string #15656

Closed
williamhibberd opened this issue Sep 4, 2024 · 6 comments
Closed

[5.x]: Unsupported operand types: array + string #15656

williamhibberd opened this issue Sep 4, 2024 · 6 comments
Assignees
Labels

Comments

@williamhibberd
Copy link

What happened?

Description

When adjusting a lightswitch field setting, on entry save I get the following error:

TypeError: Unsupported operand types: array + string in /var/www/html/vendor/craftcms/cms/src/services/Elements.php:3761
Stack trace:
#0 /var/www/html/vendor/craftcms/cms/src/services/Elements.php(1220): craft\services\Elements->craft\services\{closure}()
#1 /var/www/html/vendor/craftcms/cms/src/services/Elements.php(3594): craft\services\Elements->ensureBulkOp()
#2 /var/www/html/vendor/craftcms/cms/src/services/Elements.php(1306): craft\services\Elements->_saveElementInternal()
#3 /var/www/html/vendor/craftcms/cms/src/controllers/ElementsController.php(1233): craft\services\Elements->saveElement()
#4 [internal function]: craft\controllers\ElementsController->actionSave()
#5 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#6 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#7 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#8 /var/www/html/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction()
#9 /var/www/html/vendor/craftcms/cms/src/web/Application.php(649): craft\web\Application->runAction()
#10 /var/www/html/vendor/craftcms/cms/src/web/Application.php(312): craft\web\Application->_processActionRequest()
#11 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#12 /var/www/html/web/index.php(12): yii\base\Application->run()
#13 {main}

Craft CMS version

5.4.0.1

PHP version

8.3

Operating system and version

No response

Database type and version

mariadb 10.3

Image driver and version

No response

Installed plugins and versions

"craftcms/ckeditor": "^4.0.3",
"craftcms/cms": "^5.0.0",
"craftcms/contact-form": "^3.1.0",
"craftcms/contact-form-honeypot": "^2.1.0",
"craftcms/google-cloud": "^2.2.0",
"craftcms/mailgun": "^3.1.0",
"craftpulse/craft-colour-swatches": "^5.0.2",
"hybridinteractive/craft-contact-form-extensions": "^5.0.0",
"mmikkel/cp-field-inspect": "^2.0.1",
"nystudio107/craft-retour": "^5.0.3",
"nystudio107/craft-seomatic": "^5.1.1",
"nystudio107/craft-vite": "^5.0.0-beta.3",
"putyourlightson/craft-elements-panel": "^3.0.0-beta.1",
"putyourlightson/craft-sherlock": "^5.0.0-beta.3",
"putyourlightson/craft-sprig": "^3.0.0",
"spacecatninja/imager-x": "^5.0.0-beta.2",
"spacecatninja/imager-x-imageboss-transformer": "^3.0.0",
"verbb/expanded-singles": "^3.0.0-beta.2",
"verbb/hyper": "2.0.4",
"verbb/image-resizer": "^4.0.0-beta.1",
"vlucas/phpdotenv": "^5.4.0"

@i-just i-just self-assigned this Sep 4, 2024
@i-just
Copy link
Contributor

i-just commented Sep 4, 2024

Hi, thanks for getting in touch!
It looks like you’re on a version of MariaDB that is below the minimum required version. Please upgrade to at least 10.4.6 and try again - it should then work as expected.

@i-just i-just closed this as completed Sep 4, 2024
@williamhibberd
Copy link
Author

Thanks for your time @i-just. I have just upgraded to mariadb 10.4 and am still having the issue.
The issue is also happening on staging which is using MySQL 8.0.39.

@i-just
Copy link
Contributor

i-just commented Sep 4, 2024

I could only replicate this on MariaDB 10.3, not 10.4 or MySQL 8.0. That being said, it looks like someone has written to support regarding this issue, so we’re looking into it from there.

brandonkelly added a commit that referenced this issue Sep 4, 2024
@brandonkelly
Copy link
Member

I believe I Just fixed this for the next release.

@williamhibberd If you want to test, change your craftcms/cms requirement to 5.x-dev as 5.4.0.1 in composer.json, and run composer update.

@williamhibberd
Copy link
Author

Thank you @brandonkelly, that works for me.

@brandonkelly
Copy link
Member

Thanks for testing! Just released 5.4.1 with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants