php error generated on checkout (at least by credit card)

Posts: 69
Joined: 08/08/2007
Internationalizationizer

Hi,
after completing a credit card checkout on an estore running
drupal 5.1
and
ubercart version 7c with a
I am now getting this error

warning: Invalid argument supplied for foreach() in
/includes/common.inc(1347) : eval()'d code on line 147.

which I didn't get "before".
if I changed/added/updated another module that created this problem
it got past me at the time.

so, we've got a test site that is running
drupal 5.3
and
ubercart version 8 ( via ubercart-5.x-1.0-alpha8.tar.gz )
and
it coughs up the __same error.

that is very surprising.
Any thoughts ?

Thanks,
DK

Posts: 33
Joined: 10/26/2007

are you using the default ubercart credit card form or an actual gateway credit card module? IE authorize.net, linkpoint etc.

--

===
Elvis McNeely
Blogging about Drupal: http://www.elvisblogs.org/drupal

Posts: 69
Joined: 08/08/2007
Internationalizationizer

I'm using authorize.net
this ___was working without this error message on the original install .
"something" broke it .
but the reinstall which uses a backed up version of the original DB,
with new drupal and ubercart code has the same error.

details:

from
/admin/store/settings/payment

Payment settings:
Payment tracking is enabled.
Payments may be deleted by approved users.
Payments are tracked in the order logs.

Payment methods:
PayPal Express Checkout is disabled for checkout.
PayPal Website Payments Standard is enabled for checkout.
COD is disabled for checkout.
Check is enabled for checkout.
Credit Card is enabled for checkout.
Other is disabled for checkout.

Payment gateways:
Authorize.net is enabled.
PayPal Website Payments Pro is disabled.

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I'm not sure what in the world would be using eval() in the credit card code... I'd check common.inc to see what function that line is a part of to help trace down the bug.

Posts: 69
Joined: 08/08/2007
Internationalizationizer

here's the excerpt from common.inc
if you believe the error message , then I think it's complaining about an commented out line. .
doesn't make much sense yet.


  129 /**
  130 * Set an HTTP response header for the current page.
  131 *
  132 * Note: when sending a Content-Type header, always include a 'charset' type
  133 * too. This is necessary to avoid security bugs (e.g. UTF-7 XSS).
  134 */
  135 function drupal_set_header($header = NULL) {
  136   // We use an array to guarantee there are no leading or trailing delimiters.
  137   // Otherwise, header('') could get called when serving the page later, which
  138   // ends HTTP headers prematurely on some PHP versions.
  139   static $stored_headers = array();
  140
  141   if (strlen($header)) {
  142     header($header);
  143     $stored_headers[] = $header;
  144   }
  145   return implode("\n", $stored_headers);
  146 }
  147
  148 /**

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I should've been more specific. You need line 1347 from common.inc. Line 147 refers to some other included code... it makes me think it may be a template issue or something. Have you created a custom invoice or notification template?

Posts: 69
Joined: 08/08/2007
Internationalizationizer

yes,
I had a custom template and it was broken.

Thanks!

Posts: 69
Joined: 08/08/2007
Internationalizationizer

in this thread
http://www.ubercart.org/forum/support/1721/lines_cartcheckout_arent_show...
I was noting that my weblogs weren't reflecting checkout lines.

fixing the notification template also fixed this problem.

Thanks,
DK

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Rock on.