Bug 18049 - Warning Slim::Schema::_preCheckAttributes (2469) Warning: Use of each()
: Warning Slim::Schema::_preCheckAttributes (2469) Warning: Use of each()
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.7.2
: PC All
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-01 11:40 UTC by Johannes
Modified: 2014-08-06 10:53 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2013-09-01 11:40:19 UTC
The scanner warns every file on  Slim::Schema::_preCheckAttributes (2469) Warning: Use of each().

The code is potentially incorrect and can result in unwanted results. 

It can easily be corrected with :

2469,2470c2469
<       foreach my $key (keys($attributes)) {
---
>       while (my ($key, $val) = each %$attributes) {


It would also be a bit faster as the value is not needed in the loop.
Comment 1 Michael Herger 2014-08-06 10:53:40 UTC
This should be fixed in the latest builds.