Jump to content



Issue Information

  • #000586

  • 0 - None Assigned

  • Won't Fix

  • -

  • -

Issue Confirmations

  • Yes (0)No (0)
Photo

Major bug in catalog/includes/modules

Posted by Juto on 07 March 2013 - 21:44

As an example have a look at the ot_loworder_fee, the number of parenthesis don't match up.

A closer look at the line reveals that there are 6 left parenthesis, but only 5 right parenthesis.

<?php
//ot_loworderfee original:
tep_db_query("insert into " . TABLE_CONFIGURATION . "
(
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
set_function,
date_added
)
values
(
'Display Low Order Fee',
'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS',
'true',
'Do you want to display the low order fee?',
'6',
'1',
'tep_cfg_select_option(array(\'true\', \'false\'), '
, now())
");
?>
Shouldn't the line read:
<?php
tep_db_query("insert into " . TABLE_CONFIGURATION . "
(
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
set_function,
date_added
)
values
(
'Display Low Order Fee',
'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS',
'true',
'Do you want to display the low order fee?',
'6',
'1',
'tep_cfg_select_option(array(\'true\', \'false\')),
now())
");
?>


That is, this
'tep_cfg_select_option(array(\'true\', \'false\'), '
, now())");

Should be:
'tep_cfg_select_option(array(\'true\', \'false\')),
now())
");

Regards

Sara

No! This was not a bug.
Looking into modules.php the closing right parenthesis is within:
eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");

I see now that the db insert needs to be that way, otherwise the $value and the $key would be left out from the function.
So it's not a bug, it was a learning lesson for me!

Kindly remove this "report"

Sara

changed status to: Won't Fix