Bug 30920: (follow-up) Cleanup warning from C4::Biblio::GetAuthorisedValueDesc
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 10 Mar 2023 16:33:44 +0000 (16:33 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 13 Mar 2023 18:11:49 +0000 (15:11 -0300)
We simply return early and empty if $value is not passed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Biblio.pm

index 96f494d..e90eb11 100644 (file)
@@ -1375,6 +1375,8 @@ descriptions rather than normal ones when they exist.
 sub GetAuthorisedValueDesc {
     my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_;
 
+    return q{} unless defined($value);
+
     my $cache     = Koha::Caches->get_instance();
     my $cache_key;
     if ( !$category ) {