• Resolved aetherscythe

    (@aetherscythe)


    How to fix?

    Warning: Invalid argument supplied for foreach() in /home/customer/www/example.com/public_html/wp-content/plugins/advanced-cron-manager-pro/inc/License/EDD_SL_Plugin_Updater.php on line 282

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter aetherscythe

    (@aetherscythe)

    Is the author present in this forum? :-/

    I replaced EDD_SL_Plugin_Updater.php with the latest version from https://raw.githubusercontent.com/easydigitaldownloads/easy-digital-downloads/master/includes/EDD_SL_Plugin_Updater.php

    It did not resolve the problem, it only changed the line number. ??

    PHP Warning: Invalid argument supplied for foreach() in /home/customer/www/example.com/public_html/wp-content/plugins/advanced-cron-manager-pro/inc/License/EDD_SL_Plugin_Updater.php on line 356

    I paid for this. I should have received a response by now.

    Thread Starter aetherscythe

    (@aetherscythe)

    ?

    Thread Starter aetherscythe

    (@aetherscythe)

    I put a check in the code to avoid the problem.

    Unfortunately that means if you don’t fix this on your side, then my corrections will be lost when you next updated the plugin.

    Here is the fixed code around line 356 of the version from GitHub, referenced above:

    
            private function convert_object_to_array( $data ) {
                    $new_data = array();
                    /**
                     * Added checking to avoid arror when $data is not an array :: LDS 11/23/2020
                     */
                    if (is_array($data) || is_object($data)) {
                            foreach ( $data as $key => $value ) {
                                    $new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value;
                            }
                    }
    
                    return $new_data;
            }
    
    Plugin Author Kuba Mikita

    (@kubitomakita)

    @aetherscythe this support forum is intended for the free version of the plugin. Please use the support form on our website or just write an email to us to get the PRO plugin support.

    In the meantime, this is a 3rd party lib we are using for the license checks, I just sent them a PR: https://github.com/easydigitaldownloads/easy-digital-downloads/pull/8287

    I’ll also fix this in our codebase.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PRO: Invalid argument supplied for foreach()’ is closed to new replies.