[Tickets #9223] Re: Kronolith_Tagger: ensureTypes not recognizing existing types

bugs at horde.org bugs at horde.org
Sun Sep 5 14:59:03 UTC 2010


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

Ticket URL: http://bugs.horde.org/ticket/9223
------------------------------------------------------------------------------
  Ticket             | 9223
  Updated By         | testhorde at trash-mail.com
  Summary            | Kronolith_Tagger: ensureTypes not recognizing existing
                     | types
  Queue              | Kronolith
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


testhorde at trash-mail.com (2010-09-05 10:59) wrote:

>> The db statement is returning an array. I assume this should only be
>> a string?
>
> No, it should be an array, that's why it's in a foreach loop.   
> That's what selectAssoc() is expected to return. type_id should be  
> the key, and type_name is the value.  So.... in the loop, $id is the  
> type_id and $type is type_name.

Exactly there's the problem in the loop. Here is my debugging:
1. loop:
$key: 0
$type: Array ( [calendar] => 1 )
2. loop:
$key: 1
$type: Array ( [event] => 2 )

If I understand everything right, it should be:
1. loop:
$key: 1
$type: calendar
2. loop:
$key: 2
$type: event






More information about the bugs mailing list