1 | <?php |
||
2 | |||
3 | // HOST-RESOURCES-MIB - Storage Objects |
||
4 | if (! is_array($storage_cache['hrstorage'])) { |
||
5 | $storage_cache['hrstorage'] = snmpwalk_cache_oid($device, 'hrStorageEntry', null, 'HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES'); |
||
0 ignored issues
–
show
|
|||
6 | d_echo($storage_cache); |
||
7 | } |
||
8 | |||
9 | $entry = $storage_cache['hrstorage'][$storage['storage_index']]; |
||
10 | |||
11 | $storage['units'] = $entry['hrStorageAllocationUnits']; |
||
12 | $entry['hrStorageUsed'] = fix_integer_value($entry['hrStorageUsed']); |
||
13 | $entry['hrStorageSize'] = fix_integer_value($entry['hrStorageSize']); |
||
14 | $storage['used'] = ($entry['hrStorageUsed'] * $storage['units']); |
||
15 | $storage['size'] = ($entry['hrStorageSize'] * $storage['units']); |
||
16 | $storage['free'] = ($storage['size'] - $storage['used']); |
||
17 |
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.