Bug 41440: Fix bug revealed by unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2026-04-07 09:02:54 -04:00 committed by Lucas Gass
parent 07c37c10c4
commit c6ef3094ca
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 2 deletions

View File

@ -812,9 +812,10 @@ sub get_rfc4646_from_iso639 {
return $cached if $cached;
my $rfc_subtag =
Koha::Database->new()->schema->resultset('LanguageRfc4646ToIso639')->find( { iso639_2_code => $iso_code } );
$memory_cache->set_in_cache( $cache_key, $rfc_subtag );
if ($rfc_subtag) {
return $rfc_subtag->rfc4646_subtag;
my $subtag = $rfc_subtag->rfc4646_subtag;
$memory_cache->set_in_cache( $cache_key, $subtag );
return $subtag;
} else {
return;
}