Code: Select all
PHP Notice: Uninitialized string offset: 26 in xxx/cacti/plugins/dsstats/functions.php on line 275
Code: Select all
/* create the command syntax to get data */
/* assume that an RRDfile has not more than 26 data sources */
$defs = "abcdefghijklmnopqrstuvwzyz";
$i = 0;
$def = "";
$xport = "";
/* escape the file name if on Windows */
if ($config["cacti_server_os"] != "unix") {
$rrdfile = str_replace(":", "\\:", $rrdfile);
}
/* setup the export command by parsing throught the internal data source names */
if (sizeof($dsnames)) {
foreach ($dsnames as $dsname => $present) {
if ($average) {
$def .= "DEF:" . $defs[$i] . "=\"" . $rrdfile . "\":" . $dsname . ":AVERAGE ";
$xport .= " XPORT:" . $defs[$i];
$i++;
}
if ($max) {
$def .= "DEF:" . $defs[$i] . "=\"" . $rrdfile . "\":" . $dsname . ":MAX ";
$xport .= " XPORT:" . $defs[$i];
$i++;
}
}
}