https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14969
--- Comment #41 from Jonathan Druart <[email protected]> --- (In reply to Dobrica Pavlinusic from comment #40) > Is there reason why we use > > output_pref( { dt => dt_from_string( $subs->{startdate} ), dateonly => 1 > } ); > > instead of > > output_pref( { str => subs->{startdate}, dateonly => 1 } ); > > Second one has nice side-effect that it supports empty dates (which return > as undef from database) in serial module. In our case, empty dates for > planneddate and publisheddate produce application error base hash > > { dt => dt_from_string( $line->{planneddate} ), dateonly => 1 } > > folds to > > { dt , dateonly => 1 } > > which makes dt = 'dateonly' which in turn is not object and result in > application error. > > Should I prepare separate bug for this change? Does it make sense? Dobrica, The removal of C4::Dates was quite long, and bug 15166 (which introduced the str param) has been done during this process. Of course we should remove *all* occurrences of output_pref({dt = dt_from_string}); as it is dangerous. It's on my todo list, I just need some motivation... Please open the bug report and assign it to me, maybe it will bring me some energy to do it :) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
