PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject_FormBuilder » Bug #423

Form file uploading bug.

Details

Submitted2003-12-14 22:47 UTC
Fromkrisc79 at tlen dot pl
Assignedmw21st
StatusClosed
PackageDB_DataObject_FormBuilder
PHP Version4.3.4
OSXP
Roadmaps(Not assigned)

Comments

[2003-12-14 22:47 UTC] krisc79 at tlen dot pl

Description:
------------
Bug in database update/insert field when uploading file from form input file control.
My Fix:
function processForm($values)
{
....
foreach ($values as $field=>$value) {
$this->debug("Field $field ");
if (in_array($field, array_keys($this->_do->table()))) {
if (is_array($value)) {
$this->debug(" (converting date) ");
/******* KRISC ADDITION FOR CORRECT FILE UPLOADS 27_11_2003 *****/
$this->debug(" file array also! ");
//print_r ($value);
if (isset($value['tmp_name']))
$value = $value['name'];
else
$value = $this->_array2date($value);
}
$this->_do->$field = $value;
$this->debug("is substituted with '$value'.\n");
} else {
$this->debug("is not a valid field.\n");
}
}
.....
}

[2003-12-31 00:19 UTC] mw21st at php dot net

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.