Menu

Invalid argument supplied for foreach() in application\displayblock.class.inc.php

Deuce Sapp
2021-02-24
2021-02-25
  • Deuce Sapp

    Deuce Sapp - 2021-02-24

    Hello! I have a fresh install of 2.7.3 build 6624. I have the following extensions installed:
    Approval Process automation V2.0.1
    Mail to ticket automation V3.1.1
    User Actions Configurator V1.3.5
    IPAM for iTop V2.7.0
    Network Management Extended V1.0.0

    Whenever I navigate to the list of organizations, or contacts I get the error:
    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\web\application\displayblock.class.inc.php on line 1734

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\web\application\displayblock.class.inc.php on line 1734

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\web\application\displayblock.class.inc.php on line 1830

    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\web\application\displayblock.class.inc.php on line 1830

    Any thoughts? Is there is a way to remove the extensions to see if they are the root cause of my problem?

     
  • Guillaume Lajarige

    Hello Deuce,

    Indeed the problem must come from an extension as the code lines you referred too are APIs hooks for them.

    If you are on a production environment, you should instead change the settings in your php.ini to NOT display warnings. This is the recommended settings for a prod. env.

    Why do I recommend this instead of removing the extensions? Because due to the classes they bring and some of the data you might already have in the DB it will make your iTop crash.

    If you are on a dev. / test environment, you can just delete their folders from either <itop>/extensions (manually installed), <itop>/data/production-modules (deployed through the Hub). Then run the setup again. Ideally, remove them one by one to check which one is causing you the trouble.</itop></itop>

    Then I will create a bug ticket for this.

    Hope this helps,
    Guillaume
    
     
  • Deuce Sapp

    Deuce Sapp - 2021-02-25

    Guillaume, that's fantastic. Thanks for the guidance. I can confirm that turning off warnings in the .ini file resolved the issue.

     
  • Guillaume Lajarige

    Great, glad to see you fixed it! ✌

    Cheers,
    Guillaume

     

Log in to post a comment.