mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Merge pull request #4046 from Icinga/fix/error-on-incomplete-inspection-4026
Fix error on incomplete ldap inspection
This commit is contained in:
commit
b8975b256a
@ -321,7 +321,7 @@ class ResourceConfigForm extends ConfigForm
|
|||||||
$inspection = static::inspectResource($this);
|
$inspection = static::inspectResource($this);
|
||||||
if ($inspection !== null) {
|
if ($inspection !== null) {
|
||||||
$join = function ($e) use (&$join) {
|
$join = function ($e) use (&$join) {
|
||||||
return is_string($e) ? $e : join("\n", array_map($join, $e));
|
return is_array($e) ? join("\n", array_map($join, $e)) : $e;
|
||||||
};
|
};
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
'note',
|
||||||
|
@ -398,7 +398,7 @@ class UserBackendConfigForm extends ConfigForm
|
|||||||
$inspection = static::inspectUserBackend($this);
|
$inspection = static::inspectUserBackend($this);
|
||||||
if ($inspection !== null) {
|
if ($inspection !== null) {
|
||||||
$join = function ($e) use (&$join) {
|
$join = function ($e) use (&$join) {
|
||||||
return is_string($e) ? $e : join("\n", array_map($join, $e));
|
return is_array($e) ? join("\n", array_map($join, $e)) : $e;
|
||||||
};
|
};
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
'note',
|
||||||
|
@ -230,7 +230,7 @@ class UserGroupBackendForm extends ConfigForm
|
|||||||
$inspection = static::inspectUserBackend($this);
|
$inspection = static::inspectUserBackend($this);
|
||||||
if ($inspection !== null) {
|
if ($inspection !== null) {
|
||||||
$join = function ($e) use (&$join) {
|
$join = function ($e) use (&$join) {
|
||||||
return is_string($e) ? $e : join("\n", array_map($join, $e));
|
return is_array($e) ? join("\n", array_map($join, $e)) : $e;
|
||||||
};
|
};
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
'note',
|
||||||
|
@ -1533,7 +1533,10 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
try {
|
try {
|
||||||
$cap = LdapCapabilities::discoverCapabilities($this);
|
$cap = LdapCapabilities::discoverCapabilities($this);
|
||||||
$discovery = new Inspection('Discovery Results');
|
$discovery = new Inspection('Discovery Results');
|
||||||
$discovery->write($cap->getVendor());
|
$vendor = $cap->getVendor();
|
||||||
|
if (isset($vendor)) {
|
||||||
|
$discovery->write($vendor);
|
||||||
|
}
|
||||||
$version = $cap->getVersion();
|
$version = $cap->getVersion();
|
||||||
if (isset($version)) {
|
if (isset($version)) {
|
||||||
$discovery->write($version);
|
$discovery->write($version);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user