Bug 38365: Fix no-op //= operator on variable declarations

The //= (defined-or assignment) operator on a freshly declared
variable is a no-op since the variable is always undef at that
point. Replace with simple = assignment.

Affects header_name(), header_value(), and is_enabled() methods.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2026-02-02 10:02:23 +00:00 committed by Jonathan Druart
parent 70933f0843
commit ececcb535f
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ sub new {
sub header_name {
my ( $self, $args ) = @_;
my $interface //= $args->{interface} || C4::Context->interface;
my $interface = $args->{interface} || C4::Context->interface;
my $conf_csp = $self->{config}->get('content_security_policy');
@ -119,7 +119,7 @@ sub header_name {
sub header_value {
my ( $self, $args ) = @_;
my $interface //= $args->{interface} || C4::Context->interface;
my $interface = $args->{interface} || C4::Context->interface;
my $conf_csp = $self->{config}->get('content_security_policy');
@ -153,7 +153,7 @@ sub header_value {
sub is_enabled {
my ( $self, $args ) = @_;
my $interface //= $args->{interface} || C4::Context->interface;
my $interface = $args->{interface} || C4::Context->interface;
my $conf_csp = $self->{config}->get('content_security_policy');