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:
parent
70933f0843
commit
ececcb535f
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue