The following error is recorded in dblog when loading the checkout page.

Notice: Undefined variable: user in uc_payment_get_details() (line 413 of ubercart/payment/uc_payment/uc_payment.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
498 bytes

The global $user variable wasn't loaded before using $user->uid.

DamienMcKenna’s picture

Title: Undefined variable: user in uc_payment_get_details » Undefined variables in uc_payment_get_details
Status: Needs review » Needs work

Another error two lines later:

Notice: Undefined index: cart_order in uc_payment_get_details() (line 410 of ubercart/payment/uc_payment/uc_payment.module).

DamienMcKenna’s picture

A third error, just a few lines further on:

Notice: Trying to get property of non-object in uc_payment_get_details() (line 415 of ubercart/payment/uc_payment/uc_payment.module).

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
857 bytes

This patch resolves all three errors.

longwave’s picture

Status: Needs review » Fixed

Committed, thanks for the patches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.