From 31850066cce681bc7e4b51e6de57aad27dafa488 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 Sep 2013 16:39:45 +0200 Subject: [PATCH] Bug 10855: Fix instance vs static method This patch fixes the error message. The 3 modified routines *are* static methods. --- Koha/AdditionalField.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/AdditionalField.pm b/Koha/AdditionalField.pm index de6f763..4b38a45 100644 --- a/Koha/AdditionalField.pm +++ b/Koha/AdditionalField.pm @@ -135,7 +135,7 @@ sub fetch_values { sub all { my ( $class, $args ) = @_; - die "BAD CALL: Don't use fetch_all_values as a static method" + die "BAD CALL: Don't use fetch_all_values as an instance method" if ref $class and UNIVERSAL::can($class,'can'); my $tablename = $args->{tablename}; my $searchable = $args->{searchable}; @@ -172,7 +172,7 @@ sub all { sub fetch_all_values { my ( $class, $args ) = @_; - die "BAD CALL: Don't use fetch_all_values as a static method" + die "BAD CALL: Don't use fetch_all_values as an instance method" if ref $class and UNIVERSAL::can($class,'can'); my $record_id = $args->{record_id}; @@ -199,7 +199,7 @@ sub fetch_all_values { sub get_matching_record_ids { my ( $class, $args ) = @_; - die "BAD CALL: Don't use fetch_all_values as a static method" + die "BAD CALL: Don't use fetch_all_values as an instance method" if ref $class and UNIVERSAL::can($class,'can'); my $fields = $args->{fields} // []; -- 1.7.10.4