1 | <?php |
||
2 | |||
3 | if (! is_array($storage_cache['netapp-storage'])) { |
||
4 | $storage_cache['netapp-storage'] = snmpwalk_cache_oid($device, 'dfEntry', null, 'NETAPP-MIB'); |
||
0 ignored issues
–
show
|
|||
5 | d_echo($storage_cache); |
||
6 | } |
||
7 | |||
8 | $entry = $storage_cache['netapp-storage'][$storage['storage_index']]; |
||
9 | |||
10 | $storage['units'] = 1024; |
||
11 | if (isset($entry['df64TotalKBytes']) && is_numeric($entry['df64TotalKBytes'])) { |
||
12 | $storage['used'] = ($entry['df64UsedKBytes'] * $storage['units']); |
||
13 | $storage['size'] = ($entry['df64TotalKBytes'] * $storage['units']); |
||
14 | } else { |
||
15 | $storage['used'] = ($entry['dfKBytesUsed'] * $storage['units']); |
||
16 | $storage['size'] = ($entry['dfKBytesTotal'] * $storage['units']); |
||
17 | } |
||
18 | |||
19 | $storage['free'] = ($storage['size'] - $storage['used']); |
||
20 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.