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)
{
while (list($field,$value) = each($fields)) {
while (list($field,$value) = each($fields))
{
// Depending on how the array was build, this is needed.
// Yet, I can't figure out why ....
if (gettype($value) == "integer") {
$field = $value;
if (gettype($value) == "integer")
{
$value = $field;
}
if ($this->stock_contact_fields[$field]) {
if ($this->stock_contact_fields[$field])
{
$stock_fields[$field] = $value;
$stock_fieldnames[$field] = $this->stock_contact_fields[$field];
} else {
}
else
{
$extra_fields[$field] = $value;
}
}