Exception during cron when module is installed but gateway has not been created yet.

Created on 1 June 2022, over 2 years ago
Updated 10 September 2024, 2 months ago

Problem/Motivation

When you install and enable this module, but have not created a payment gateway yet, the following exception occurs when :

Drupal\Core\Database\InvalidQueryException: Query condition 'commerce_payment_method.payment_gateway IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (line 117 of /app/web/core/lib/Drupal/Core/Database/Query/Condition.php). {"severity_level":3,"exception":"[object] (Drupal\\Core\\Database\\InvalidQueryException(code: 0): Query condition 'commerce_payment_method.payment_gateway IN ()' cannot be empty. at /app/web/core/lib/Drupal/Core/Database/Query/Condition.php:117)"}

Proposed resolution

A simple check can avoid this filling up the logs.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States TomTech

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024