[Tickets #9378] Unexpected values in sql result lead to duplicate inserts

bugs at horde.org bugs at horde.org
Wed Nov 10 09:49:41 UTC 2010


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/9378
------------------------------------------------------------------------------
  Ticket             | 9378
  Created By         | d-fens at 00010111.de
  Summary            | Unexpected values in sql result lead to duplicate
                     | inserts
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 3. High
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


d-fens at 00010111.de (2010-11-10 04:49) wrote:

hi,

in horde/content/lib/Types/Manager.php line 70
foreach ($this->_db->selectAssoc('SELECT type_id, type_name FROM ' .  
$this->_t('types') . ' WHERE type_name IN ('.implode(',',  
array_map(array($this->_db, 'quote'), array_keys($typeName))).')') as  
$id => $type) {

returns
array(2) { ["calendar"]=>  bool(false) ["event"]=>  bool(false) }
but it seems its expected to be calendar=> 1, event => 2

so no entrys are found and the insert following leads to

INSERT INTO `rampage_types` (type_name) VALUES ('calendar') [pid 12751  
on line 761 of  
"/var/www/_horde/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"]
2010-11-10T10:40:32+01:00 EMERG: HORDE [kronolith] QUERY FAILED:  
Duplicate entry 'calendar' for key 2








More information about the bugs mailing list