Support » Plugin: Network Plugin Auditor » [Plugin: Network Plugin Auditor] Invalid argument supplied foreach()

  • Resolved montykaplan


    On sites.php
    The first site listed has the plugins shown correctly. None of the other sites are working, everything else has this error:
    Warning: Invalid argument supplied for foreach() in /var/www/wp-content/plugins/network-plugin-auditor/network-plugin-auditor.php on line 81

    Here is a screenshot:

    On plugins.php
    The plugin list does not say which sites a plugin is activated on, and only ever has anything in the Active Blogs column if it is network activated.

    Any thoughts?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi montykaplan,

    Thanks for the heads up on the warning message! I’m not able to replicate this error, but it looks like it isn’t properly handling the blogs that have no plugins active at all. I’ll add an error check to prevent that message and hopefully that gets you back up and running.

    As for the plugins.php page issues, can you provide more details about your configuration? I’m not able to replicate that issue on 3.3.1 so if you could enable debugging with this code and send me the resulting debug.log file I can sort out what is happening.

    define('WP_DEBUG', true); // false
    if (WP_DEBUG) {
      define('WP_DEBUG_LOG', true);
      define('WP_DEBUG_DISPLAY', false);
      @ini_set('display_errors', 0);
      @ini_set('error_reporting', E_ALL & ~E_NOTICE );
      @error_reporting(E_ALL & ~E_NOTICE);


    Hi montykaplan,

    Please let me know if you still see these issues with the new version 1.1.

    – Kathy

    Thanks for following up!

    The error messages are gone. Dashboard->Sites->All Sites still only shows plugins active on the first listed blog (the blog doesn’t have a subdirectory it is the domain root e.g. “” all other blogs in the network are set up as “”).

    I also added the debug code to the plugin and do not see any debug.log file in either the network-plugin-auditor folder or the wp-content folder. Am I looking in the right place?

    Hi montykaplan,

    I apologize that I was not clear about where to put the debug code, it should be added to your wp-config.php file, not within the plugin. Anywhere above the “/* That’s all, stop editing! Happy blogging. */” line will work. The debug.log will be found in your wp-content directory but if you have many plugins it may become large very quickly. Please add the code and visit the Sites, Themes and Plugins pages of your network admin then send over the file. (Don’t drop it here, it may have info about your config that you don’t want to make public)

    The plugin should would for either subdomain or subfolder networks without issue, but it assumes the database is using the standard network setup. Are you using any plugins that customize the names of your database tables for the blogs?

    – Kathy

    Hey, thanks for the instructions, now I’ve got the debug log.

    I didn’t see your e-mail address so if you e-mail me I’ll reply with the file, I’m montykaplan at gmail

    Hi montykaplan,

    Try the new 1.2 version and let me know if this resolves your issues. I’ve improved the database-prefix checking.

    – Kathy

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Network Plugin Auditor] Invalid argument supplied foreach()’ is closed to new replies.