[kronolith] Kronolith H5 (4.2.23) (final)

Jens Wahnes wahnes at uni-koeln.de
Tue Sep 26 10:26:04 UTC 2017


Jan Schneider wrote:
> 
> Zitat von Jens Wahnes <wahnes at uni-koeln.de>:
> 
>> Hi,
>>
>> Jan Schneider wrote:
>>> The Horde Team is pleased to announce the final release of the Kronolith
>>> Calendar Application version H5 (4.2.23).
>>
>>>     * Small bugfixes.
>>
>> after upgrading to version 4.2.23, we saw a ton of error messages in 
>> the log file like this:
>>
>> NOTICE: HORDE [kronolith] PHP ERROR: Undefined offset: 0 [pid 28313 on 
>> line 799 of "[...]/kronolith/lib/Event.php"]
>>
>> This seems to be an error introduced by this commit:
>>
>> https://github.com/horde/horde/commit/72560bfc1e01282cec6e9c8fdbdebfbe39a5809f#diff-89c46998429999e8bfbc8f5d372bf0d0 
>>
>>
>> From my perspective, it looks like there two things wrong with this code:
>>
>> 1. The right parenthesis seems to be at the wrong spot when calling 
>> count().
>> 2. The assumption that an array with only one element will have that 
>> element at position 0 does not hold.
>>
>> So I tried to fix that for myself, changing the code in 
>> kronolith/lib/Event.php around line 799 to read
>>
>>             // Tags
>>             if ($this->tags) {
>>                 if (count($this->tags) == 1) {
>>                     $vEvent->setAttribute('CATEGORIES', 
>> current($this->_tags));
>>                 } else {
>>                     $vEvent->setAttribute('CATEGORIES', '', array(), 
>> true, $this->tags);
>>                 }
>>             }
>>
>> This does in fact help to make the error messages in the log file go 
>> away, but it's probably not a good idea to access "$this->_tags" 
>> directly instead of "$this->tags". Can someone help me find a better 
>> way to do it?
>>
>> When using Horde::debug($this->tags), I could see examples of what 
>> this array looks like, e.g.:
>>
>> array(1) {
>>   [242]=>
>>   string(10) "Geburtstag"
>> }
>>
>> array(1) {
>>   [283]=>
>>   string(6) "Urlaub"
>> }
>>
>> So that's why accessing $this->tags[0] does not work.
>>
>>
>> The same problem with tags and CalDAV categories appears to be present 
>> in nag as well.
>>
>> With nag, we also saw lots of error messages in the log file that go 
>> like this:
>>
>> HORDE [nag] PHP ERROR: Undefined offset: 0 [pid 11411 on line 1245 of 
>> "[...]/nag/lib/Task.php"]
>>
>> But I can't really tell what commit this nag issue is related to or 
>> how to fix it. Is the priorityMap just missing an entry at index 0, 
>> i.e. "0 => 0"? I didn't want to fiddle with it because I don't 
>> understand what these magic values do.
>>
>>
>> Jens
> 
> Please report these to bugs.horde.org
> 

OK, reported as https://bugs.horde.org/ticket/14698 and 
https://bugs.horde.org/ticket/14699


Jens

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5326 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.horde.org/archives/kronolith/attachments/20170926/0ff1abfc/attachment-0001.bin>


More information about the kronolith mailing list