Bug 7964

Summary: Perl error when adding a range of holidays without To: date
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: HolidaysAssignee: Henri-Damien LAURENT <henridamien>
Status: RESOLVED DUPLICATE QA Contact: Ian Walls <koha.sekjal>
Severity: normal    
Priority: P5 - low CC: christophe.croullebois, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 6663    

Description Katrin Fischer 2012-04-14 13:07:02 UTC
To reproduce:
Add a range of holidays using either
- Holidays on a range or
- Holidays repeated yearly on a range
and leave the 'To:' date empty.

Following error will be shown:

Software error:

The 'month' parameter (undef) to DateTime::new was an 'undef', which is not one of the allowed types: scalar
 at /usr/lib/perl5/DateTime.pm line 200
	DateTime::new(undef, 'year', undef, 'month', undef, 'day', undef) called at /home/katrin/kohaclone/tools/newHolidays.pl line 129
	main::add_holiday('holidayrangerepeat', 'PVL', 4, 26, 4, 2012, '', '') called at /home/katrin/kohaclone/tools/newHolidays.pl line 66

For help, please send mail to the webmaster (webmaster@bumblebee), giving this error message and the time and date of the error.
Comment 1 Christophe Croullebois 2012-04-16 14:53:09 UTC
Hello Katrin,
I am quite sure that in the 7351 we have a fix of this bug, try to test with it, I have changed also for creating on a range, in my memory I have chosen the option to do nothing, lighter than a warning window.
So, if you don't fill the "to", koha does nothing, and you can see that on the calendar.
Comment 2 Marc Véron 2012-04-27 19:54:06 UTC
I could reprocuce the error with Koha version: 	3.08.00.000

Then I applied Patch 7351 and tested. Error was gone.

7351 is marked as Signed Off

Marking this Bug as RESOLVED FIXED

Marc
Comment 3 Marc Véron 2012-04-27 19:59:49 UTC
Changed to RESOLVED DUPLICATE

*** This bug has been marked as a duplicate of bug 7351 ***