[Koha-bugs] [Bug 8738] DateTime object being compared to a date string in circulation

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 25 12:45:41 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8738

--- Comment #8 from MJ Ray (software.coop) <mjr at software.coop> ---
For completeness, here's the correct error message when the analytic
items enh isn't installed:

Software error:
A DateTime object can only be compared to another DateTime object
(DateTime=HASH(0xa2d8aa8), 2012-08-31). at
/usr/share/koha/intranet/cgi-bin/circ/circulation.pl line 464

I think the scenario is as follows:

a. install a post-hourly-loans koha-common (3.8.4 was where I met it)
on Ubuntu 10.04 LTS;

b. circulate some books.

And no, I don't think it's "backwards" to study the code and question
how that ever doesn't error!

Looking into that key question further, I found the changelog for
DateTime.pm suggests only versions >= 0.54 allow comparing a DateTime
to a string, but koha-common doesn't require any version
(interestingly C4::Installer::PerlDependencies::PERL_DEPS says 0.58,
so there's arguably a bug there) and Ubuntu 10.04 LTS (which is on at
least two of the servers I've seen this bug on) only has version 0.52.
So there are two obvious fixes:

1. apply this patch;

2. add a libdatetime-perl version requirement to koha-common which
effectively excludes Ubuntu 10.04 Long Term Support from them, or
would need us to provide packages for it.

(This seems like an old chestnut - racing ahead with adoption of new
versions of dependencies without considering what is actually
available on stable server distributions - with a new twist, in that
koha-common's version requirements don't match what's in
C4::Installer::PerlDepenencies.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list