Skip to content

[5.x]: Accessing Commerce > Settings > Gateways after upgrade to V5 generates error #4077

@rogerdawkins

Description

@rogerdawkins

What happened?

Description

Just upgraded to Craft & Commerce 5. When editing cart or accessing Commerce > Settings > Gateways I get a TypeError relating to setOrderCondition in src/base/Gateway.php. A null is passed in but the function is expecting a string or array.

As a test I modified src/base/Gateway.php on line 286 and added |null as a valid parameter and then amended line 288 to if ($condition == null || empty($condition)) { and all good after that.

Craft CMS version

5.8.6

Craft Commerce version

5.4.2

PHP version

8.2.28

Operating system and version

Linux 4.18.0-553.lve.el8.x86_64

Database type and version

MySQL 8.0.42

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-43)

Installed plugins and versions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions