[Koha-bugs] [Bug 33837] Objects->filter_by_last_update: Does not allow time comparison

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 26 14:06:40 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33837

--- Comment #19 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Kind of distracted by this code construction in the context:

    try {
        $count = $patrons->filter_by_last_update(
            { timestamp_column_name => 'updated_on', from => '1970-12-31' } )
          ->count;
print 0/0;
    }
    catch {
        ok(
            $_->isa(
                'No exception raised, from and to parameters can take an iso
formatted date'
            )
        );
    };

The print is from me.
We pass a string too to isa. So isa compares the exception with the string and
always returns false to ok. And ok raises a warning without description.
The description was obviously meant for ok and not for isa.

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


More information about the Koha-bugs mailing list