Title: Argument #2 should be an array
Last modified: August 21, 2016

---

# Argument #2 should be an array

 *  Resolved [SiteDesignUSA](https://wordpress.org/support/users/sitedesignusa/)
 * (@sitedesignusa)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/argument-2-should-be-an-array/)
 * Hi, and thanks for the plugin.
 * php-fpm 5.3 wordpress 3.6 a couple of errors from this plugin on nginx 1.4 server.
   Running Centos 6.4
 * `2013/08/15 12:37:39 [error] 2901#0: *493 FastCGI sent in stderr: "PHP message:
   PHP Warning: implode(): Invalid arguments passed in /home/releases/20130815035315/
   content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php 
   on line 550" while reading upstream, request: "GET /wp-admin/options-general.
   php?page=wordpress-file-monitor-plus`
 * `2013/08/15 12:37:39 [error] 2901#0: *493 FastCGI sent in stderr: "PHP message:
   PHP Warning: implode(): Invalid arguments passed in /home/releases/20130815035315/
   content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php 
   on line 570" while reading upstream, request: "GET /wp-admin/options-general.
   php?page=wordpress-file-monitor-plus HTTP/1.1",`
 * `2013/08/15 12:37:44 [error] 2901#0: *493 FastCGI sent in stderr: "PHP message:
   PHP Warning: array_map(): Argument #2 should be an array in /home/releases/20130815035315/
   content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php 
   on line 420" while reading response header from upstream`
 * Looks like line 420
    `$valid['file_check_method'] = array_map( array( __CLASS__,'
   file_check_method_func' ), $input['file_check_method'] );`
 * is called a couple of times and spits out a couple of errors.
 * Thought you should know. Looks like wordpress is clamping down on this and “prepare()”
 * Hope you can replicate and fix.
 * Thanks again and looking for update on plugin.
 * [http://wordpress.org/plugins/wordpress-file-monitor-plus/](http://wordpress.org/plugins/wordpress-file-monitor-plus/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [SiteDesignUSA](https://wordpress.org/support/users/sitedesignusa/)
 * (@sitedesignusa)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/argument-2-should-be-an-array/#post-4034813)
 * Ok, I think I’ve found the fix.
 * Surfed the web and found this link
 * [https://github.com/woothemes/woocommerce/commit/0db108ab695f55a34af656ee523e2f378925a57b](https://github.com/woothemes/woocommerce/commit/0db108ab695f55a34af656ee523e2f378925a57b)
 * So I did this;
 * Old code:
    `$valid['file_check_method'] = array_map( array( __CLASS__, 'file_check_method_func'),
   $input['file_check_method'] );`
 * New code:
    `$valid['file_check_method'] = array_map( array( __CLASS__, 'file_check_method_func'),(
   array) $input['file_check_method'] );`
 * Testing and seems to work for the error on line 420, but the implode errors on
   line 550 and line 570 are still throwing “implode” errors. I cannot solve them.
   I hacked a little and had no luck.
 * What I see is that the implode is not being passed an array in the $options variable.
 * Thanks again and looking for update on plugin.
 *  Plugin Author [Scott Cariss](https://wordpress.org/support/users/l3rady/)
 * (@l3rady)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/argument-2-should-be-an-array/#post-4034867)
 * Can you create an issue over on the plugin GitHub page [https://github.com/l3rady/wordpress-file-monitor-plus](https://github.com/l3rady/wordpress-file-monitor-plus)
 * To fix the other two errors can you try
 * implode("\n", $options['exclude_paths_files'])
 * to
 * implode("\n", (array) $options['exclude_paths_files'])
 *  Thread Starter [SiteDesignUSA](https://wordpress.org/support/users/sitedesignusa/)
 * (@sitedesignusa)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/argument-2-should-be-an-array/#post-4034924)
 * Thanks Scott.
 * I added $options = array() in each function block and actually put some values
   in the fields i.e. checked the checkboxes (I hadn’t setup the plugin yet and 
   was watching my terminal for errors) and added ico|jpg|etc to the values textarea(
   even though the check for them was off) and it seems to have fixed things.
 * (No more errors) but I didn’t test to see what action actually fixed it.
 * Opened issue over at github.
 * Thanks again.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Argument #2 should be an array’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-file-monitor-plus_ffffff.
   svg)
 * [WordPress File Monitor Plus](https://wordpress.org/plugins/wordpress-file-monitor-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-file-monitor-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-file-monitor-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-file-monitor-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-file-monitor-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-file-monitor-plus/reviews/)

## Tags

 * [array_map()](https://wordpress.org/support/topic-tag/array_map/)

 * 3 replies
 * 2 participants
 * Last reply from: [SiteDesignUSA](https://wordpress.org/support/users/sitedesignusa/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/argument-2-should-be-an-array/#post-4034924)
 * Status: resolved