Add error checking for DS name length (#6093)

* Add error checking for DS name length

* Update RrdDefinition.php

* Move greater than 19 length test to unit test

* Remove unused variables

* Remove duplicate unit test, and update test for empty name

* Typo

* Remove extra assignment

* ...

* Remove unused items

* Update RrdDefinitionTest.php

* Update RrdDefinition.php

* Delete InvalidRrdNameException.php
This commit is contained in:
David Bell
2017-03-09 23:16:35 +00:00
committed by Tony Murray
parent 255d5fb598
commit 00a062c675

View File

@ -55,6 +55,10 @@ class RrdDefinition
{
global $config;
if (empty($name)) {
d_echo("DS must be set to a non-empty string.");
}
$ds = array();
$ds[] = $this->escapeName($name);
$ds[] = $this->checkType($type);