Browse Source
This warning emitted: Use of uninitialized value in hash element at /admin/smart-rules.pl line 569. that happened because we have NULLs in SQL results for 'categorycode' and 'itemtype' which later used as 'any' kind of category/item in the template, so for the template it passed this way: $rules->{ $r->{categorycode} }->{ $r->{itemtype} }->... but undef will stringify as "" to become a hash key ("Hashes are unordered collections of scalar values indexed by their associated string key" https://perldoc.perl.org/perldata.html), that's why "undef warning". To prevent warning here is the simple fix: $rules->{ $r->{categorycode} // '' }->{ $r->{itemtype} // '' }->... Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>20.11.x
Andrew Nugged
4 years ago
committed by
Jonathan Druart
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue