[kronolith] Factory was unable to produce driver object for driver Netherlands in year 2012 with locale nl_NL
Arjen de Korte
arjen+horde at de-korte.org
Sun Feb 10 16:58:13 UTC 2013
Citeren Jan Schneider <jan at horde.org>:
> Zitat von Arjen de Korte <arjen+horde at de-korte.org>:
>
>> When January 1st is in the calender view, but part of the month
>> before (December the previous year) is also visible,
>> Kronolith_Driver_Holidays chokes on holidays that don't occur each
>> year. Only events from December will be shown then and above error
>> message will be logged.
>>
>> I traced down the problem seems to line 80 of
>> kronolith/lib/Driver/Holidays.php. In the above case, it will be
>> called twice. Once with the previous year and once for the current
>> year. If there are holidays in the translation that didn't happen
>> in the previous year, the second call to Date_Holidays::factory
>> will result in an error and no holidays will be shown if a
>> translation is available for the holiday that didn't occur.
>>
>> For now I have more or less fixed it by making sure that every
>> holiday will be added with _addHoliday in Date_Holidays_<driver>,
>> even in years where it doesn't happen, in which case I add it to an
>> arbitrary year outside the scope we're looking at. It won't be
>> visible then, but seems to keep the call to addTranslation happy.
>>
>> I'm not sure if this is a Horde bug or a bug in Date_Holidays.
>>
>> Best regards, Arjen
>
> What you describe sounds like a bug in Date_Holidays.
It is. I have narrowed it down to a 'Driver' which only handles a
couple of holidays and translations and it still breaks. I'll create a
testcase for it and report it in the Date_Holidays bug reporting
system. Sorry for the noise.
Best regards, Arjen
More information about the kronolith
mailing list