Skip to content

Odd number of elements in hash error is no data_attributes param #6

Description

@drn05r

The following error messages occur when generating abstracts for items that have have a dimension badge box:

Odd number of elements in hash assignment at (eval 109) line 47.
Use of uninitialized value $attrs[4] in list assignment at (eval 109) line 47.

This is due to the following line:

(defined $self->param( 'data_attributes' ) ? %{$self->param( 'data_attributes' )} : undef ),

Rather than using undef if the a data_attributes param is undefined, () (i.e. an empty hash) should be used to ensure there is an even number of elements.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions