PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject_FormBuilder » Bug #5321

formprocessing with multiple crosslinks bug

Details

Submitted2005-09-07 14:13 UTC
Fromsjoerdvannoort at gmail dot com
Assignedjustinpatrin
StatusClosed
PackageDB_DataObject_FormBuilder
PHP Version5.0.4
OSDebian sarge
Roadmaps(Not assigned)

Comments

[2005-09-07 14:13 UTC] sjoerdvannoort at gmail dot com

Description:
------------
There is a bug in the processform function. It can occur when a table has multiple crosslinks and results checked options on the form not being saved to the DB.

things go wrong on line 2709 in formbuilder.php:
if (isset($oldFieldValues[$fieldvalue]))

the $oldFieldValues array can be set when processing the first crosslink. Then when the second crosslink is processed it wil remain set even when there is no entry in the second crosslink table.

The solution would probebly be unsetting $oldFieldValues just before the if structure which initiates the $oldFieldValues variable on line 2691: if ($do->find())

This problem could maybe also affect to tripple links processing because it also does not unset $oldFieldValues