• Resolved SiteDesignUSA

    (@sitedesignusa)


    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.

    https://www.ads-software.com/plugins/wordpress-file-monitor-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter SiteDesignUSA

    (@sitedesignusa)

    Ok, I think I’ve found the fix.

    Surfed the web and found this link

    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

    (@l3rady)

    Can you create an issue over on the plugin GitHub page 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

    (@sitedesignusa)

    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.