refactor: Remove inappropriate usages of truncate() (#5028)

Where truncate() is used as substr(), replace with substr()
This commit is contained in:
Tony Murray
2016-11-20 05:12:25 -06:00
committed by Neil Lathwood
parent e469aa97b0
commit a83e126b40
27 changed files with 34 additions and 34 deletions

View File

@@ -23,7 +23,7 @@ $rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id'], 'do
if (rrdtool_check_rrd_exists($rrd_filename)) {
foreach ($oids as $oid) {
$oid = str_replace('dot3Stats', '', $oid);
$oid_ds = truncate($oid, 19, '');
$oid_ds = substr($oid, 0, 19);
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $oid;
$rrd_list[$i]['ds'] = $oid_ds;