Home » Database » DB » Bug #4766
PHP Warning
Details
| Submitted | 2005-07-08 00:49 UTC |
|---|---|
| From | pierre at php dot net |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.11 |
| OS | all |
| 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();