Possible php3 fix, need to verify on 4 again

This commit is contained in:
Miles Lott 2001-06-28 09:51:57 +00:00
parent 2a5a6ae473
commit 199eed4e71

View File

@ -32,16 +32,21 @@
function split_stock_and_extras($fields) function split_stock_and_extras($fields)
{ {
while (list($field,$value) = each($fields)) { while (list($field,$value) = each($fields))
{
// Depending on how the array was build, this is needed. // Depending on how the array was build, this is needed.
// Yet, I can't figure out why .... // Yet, I can't figure out why ....
if (gettype($value) == "integer") { if (gettype($value) == "integer")
$field = $value; {
$value = $field;
} }
if ($this->stock_contact_fields[$field]) { if ($this->stock_contact_fields[$field])
{
$stock_fields[$field] = $value; $stock_fields[$field] = $value;
$stock_fieldnames[$field] = $this->stock_contact_fields[$field]; $stock_fieldnames[$field] = $this->stock_contact_fields[$field];
} else { }
else
{
$extra_fields[$field] = $value; $extra_fields[$field] = $value;
} }
} }