Skip to content

Commit

Permalink
Issue #484: Fix crash during upgrade from D7.
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfolder committed Nov 11, 2024
1 parent b1aad97 commit 9f8c076
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ubercart.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package = Ubercart - core
backdrop = 1.x
type = module

dependencies[] = system (>= 1.21.0)
dependencies[] = system (>= 1.28.2)
dependencies[] = rules (>= 2.2.0)
dependencies[] = views
dependencies[] = image
6 changes: 6 additions & 0 deletions uc_order/uc_order.rules_defaults.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
* Implements hook_default_rules_configuration().
*/
function uc_order_default_rules_configuration() {
// If we are in the middle of upgrading from D7, filter_default_format() is
// not yet set, so don't return any default rules. See
// https://github.com/backdrop-contrib/ubercart/issues/484.
if (state_get('update_d7_upgrade')) {
return array();
}
$rule = rules_reaction_rule();
$rule->label = t('E-mail an order update notification');
$rule->active = TRUE;
Expand Down

0 comments on commit 9f8c076

Please sign in to comment.