Permalink
Browse files

Fix undefined index errors on checkout confirmation page. Fixes issue #…

  • Loading branch information...
1 parent 7f8466f commit 8d55b4200a029d9a44f40eed410d71283c29a6de @markkevans markkevans committed with haraldpdl Aug 28, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 catalog/checkout_confirmation.php
View
6 catalog/checkout_confirmation.php
@@ -39,7 +39,7 @@
if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];
if (!tep_session_is_registered('comments')) tep_session_register('comments');
- if (tep_not_null($HTTP_POST_VARS['comments'])) {
+ if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
@@ -239,7 +239,8 @@
</tr>
<?php
- for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
+ if (isset($confirmation['fields'])) {
+ for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
<tr>
@@ -250,6 +251,7 @@
</tr>
<?php
+ }
}
?>

0 comments on commit 8d55b42

Please sign in to comment.