From af14d703924f5358ad57a321b749275d81c95acc Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Wed, 6 Feb 2019 14:17:01 +0000 Subject: [PATCH] Bug 20581: (follow-up) Fix status_alias comparison status_alias will arrive in the Koha object as a string, so when we special case it, we should also pass a string Signed-off-by: Katrin Fischer --- Koha/Illrequest.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 6c090f5c64..7d5eb485d2 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -185,7 +185,7 @@ sub status_alias { # https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c156 # We need a way of accepting implied undef, so we can nullify # the status_alias column, when called from $self->status - my $val = $newval == -1 ? undef : $newval; + my $val = $newval eq "-1" ? undef : $newval; my $newval = $self->SUPER::status_alias($newval); if ($newval) { return $newval; @@ -225,7 +225,7 @@ sub status { # https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c156 # We need a way of passing implied undef to nullify status_alias # so we pass -1, which is special cased in the overloaded setter - $self->status_alias(-1); + $self->status_alias("-1"); return $self->SUPER::status($newval); } return $self->SUPER::status; -- 2.11.0