Jump to content



Issue Information

  • #000245

  • 1 - Low

  • Fixed

  • 2.3.1

  • 2.3.3

Issue Confirmations

  • Yes (0)No (0)
Photo

Undefined indexes: comments & fields in File checkout_confirmation.php

Posted by Juto on 06 April 2011 - 03:43 PM

Error Type: [E_NOTICE] Undefined index:  comments
On line 42:   if (tep_not_null($_POST['comments'])) {
File checkout_confirmation.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Date / Time: 05-04-2011 19:59:23
Error Type: [E_NOTICE] Undefined index:  fields
On line 313: for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
File checkout_confirmation.php

Updating severity to: 1 - Low
Updating status to: Confirmed

Updating status to: Fixed
Issue fixed in: 2.3.2

changed fixed-in version to: 2.3.3

Are these fixes on github? If they are, where?
Thanks.

@dr_lucas

Try this: https://github.com/tgely/oscommerce2/commit/65ebd86539613cccb2b54469b7c277f09b93a898
but more than you asked.

The

Quote

Date / Time: 05-04-2011 19:59:23
Error Type: [E_NOTICE] Undefined index:  fields
On line 313: for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
File checkout_confirmation.php
problem fixed in v2.3.3
Download the package and you can see in checkout_confirmation.php.

<?php
	  if (isset($confirmation['fields'])) {
		for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		<td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		<td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>
	  </tr>
<?php
		}
	  }
?>


Great! Thanks a lot, Gergely! :)

Thanks Gergely, very nice of you to give time to bugreports. :)

I had previously fixed the Undefined index:  comments like so:

	if (isset($_POST['comments']) && tep_not_null($_POST['comments'])) {
	$comments = '';
	$comments = tep_db_prepare_input($_POST['comments']);
  }

Just forgot to add my fix.

Sara