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 » Bug #4766

PHP Warning

Details

Submitted2005-07-08 00:49 UTC
Frompierre at php dot net
Assigneddanielc
StatusClosed
PackageDB
PHP Version4.3.11
OSall
Roadmaps(Not assigned)

Comments

[2005-07-08 00:49 UTC] pierre at php dot net

Description:
------------
Silents warning "Undefined index $vars".

@@ -445,11 +436,13 @@ class DB_storage extends PEAR
*/
function store()
{
+ $params = array();
+ $vars = array();
foreach ($this->_changes as $name => $foo) {
$params[] = &$this->$name;
$vars[] = $name . ' = ?';
}
- if ($vars) {
+ if (count($vars)) {
$query = 'UPDATE ' . $this->_table . ' SET ' .
implode(', ', $vars) . ' WHERE ' .
$this->_makeWhere();