Bug 30947: (follow-up) Remove unnecessary object cloning
CalcDateDue() works on its own copy of the $startdate parameter so the cloning in the calling end is not necessary. Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
9b4b43656e
commit
7f60d88797
|
|
@ -796,7 +796,7 @@ sub CanBookBeIssued {
|
|||
my $circ_library = Koha::Libraries->find( _GetCircControlBranch($item_unblessed, $patron_unblessed) );
|
||||
|
||||
my $now = dt_from_string();
|
||||
$duedate ||= CalcDateDue( $now->clone(), $effective_itemtype, $circ_library->branchcode, $patron_unblessed );
|
||||
$duedate ||= CalcDateDue( $now, $effective_itemtype, $circ_library->branchcode, $patron_unblessed );
|
||||
if (DateTime->compare($duedate,$now) == -1 ) { # duedate cannot be before now
|
||||
$needsconfirmation{INVALID_DATE} = output_pref($duedate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue