Download & Extend

Undefined variables in uc_payment_get_details

Project:Ubercart
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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).

Comments

#1

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
ubercart-n1854598.patch498 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,117 pass(es).View details

#2

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).

#3

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).

#4

Status:needs work» needs review

This patch resolves all three errors.

AttachmentSizeStatusTest resultOperations
ubercart-n1854598-4.patch857 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,115 pass(es).View details

#5

Status:needs review» fixed

Committed, thanks for the patches.

#6

Status:fixed» closed (fixed)

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

nobody click here