Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on skipping LDAP Discovery #4603

Closed
protegh opened this issue Nov 12, 2021 · 1 comment · Fixed by #4607
Closed

Error on skipping LDAP Discovery #4603

protegh opened this issue Nov 12, 2021 · 1 comment · Fixed by #4607
Milestone

Comments

@protegh
Copy link

protegh commented Nov 12, 2021

Describe the bug

Tried to skip the LDAP Discovery in /icingaweb2/setup and got the error

Uncaught TypeError: Argument 1 passed to Icinga\Forms\ConfigForm::transformEmptyValuesToNull() must be of the type array, null given, called in /usr/share/icingaweb2/library/Icinga/Web/Wizard.php on line 290 and defined in /usr/share/icingaweb2/application/forms/ConfigForm.php:156
Stack trace:
#0 /usr/share/icingaweb2/library/Icinga/Web/Wizard.php(290): Icinga\Forms\ConfigForm::transformEmptyValuesToNull()
#1 /usr/share/icingaweb2/modules/setup/application/controllers/IndexController.php(46): Icinga\Web\Wizard->handleRequest()
#2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Setup\Controllers\IndexController->indexAction()
#3 /usr/share/icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#5 /usr/share/icingaweb2/library/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch()
#6 /usr/share/icingaweb2/lib in /usr/share/icingaweb2/application/forms/ConfigForm.php on line 156

To Reproduce

  1. Run /icingaweb2/setup on a fresh installed icingaweb2 site.
  2. On "Authentication" select "LDAP" an click "Next".
  3. On "LDAP Discovery" activate the "Skip" checkbox and click "Next".
  4. See the above cited error message.

Expected behavior

Load the next Page "LDAP Resource" and let me insert the configuration.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About):
Icinga Web 2  2.9.3     
Git Commit    c757a17530c326c7d6daebd6171486cb8167a8a1 
PHP Version   7.4.25    
MODULE  VERSION   
setup  2.9.3     
  • Web browser used: Apache 2.4
  • Icinga 2 version used (icinga2 --version): r2.13.1-1
  • Server operating system and version: Gentoo Linux
@protegh
Copy link
Author

protegh commented Nov 12, 2021

The following "fix" worked for me:

--- /usr/share/icingaweb2/modules/setup/application/forms/LdapDiscoveryPage.php	2021-11-12 17:29:33.112684170 +0100
+++ /usr/share/icingaweb2/modules/setup/application/forms/LdapDiscoveryPage.php_orig	2021-11-12 17:29:29.052444674 +0100
@@ -102,7 +102,7 @@
     public function getValues($suppressArrayNotation = false)
     {
         if (! isset($this->discovery) || ! $this->discovery->isSuccess()) {
-            return array();
+            return null;
         }
         $disc = $this->discovery;
         return array(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants