mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user