mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
parent
c70f738236
commit
a6af51f402
@ -378,7 +378,7 @@ class Config implements Countable, Iterator, ArrayAccess
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($default !== null) {
|
if ($value === null && $default !== null) {
|
||||||
$value = $default;
|
$value = $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,6 +266,11 @@ class ConfigTest extends BaseTestCase
|
|||||||
$config->fromSection('a', 'c', 'test'),
|
$config->fromSection('a', 'c', 'test'),
|
||||||
'Config::fromSection does not return the given default value for non-existent section properties'
|
'Config::fromSection does not return the given default value for non-existent section properties'
|
||||||
);
|
);
|
||||||
|
$this->assertEquals(
|
||||||
|
'c',
|
||||||
|
$config->fromSection('a', 'b', 'test'),
|
||||||
|
'Config::fromSection does not return the actual value of a section\'s property in case a default is given'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user