Coursepress errors: array_key_exists(): etc..

Hi,

I've just set up Coursepress on my localhost site, and I'm just trying to preview the test course that comes with the plugin, but I get a bunch of errors when clicking on any of the course units:

Warning: array_key_exists(): The first argument should be either a string or an integer in /Applications/XAMPP/xamppfiles/htdocs/uncoveryourblueprint/wp-includes/cache.php on line 680

Warning: Creating default object from empty value in /Applications/XAMPP/xamppfiles/htdocs/uncoveryourblueprint/wp-content/plugins/coursepress/includes/classes/class.shortcodes.php on line 3337

Warning: array_key_exists(): The first argument should be either a string or an integer in /Applications/XAMPP/xamppfiles/htdocs/uncoveryourblueprint/wp-includes/cache.php on line 680

I saw you answered a similar question, saying it was just a PHP error - nothing to worry about, and to make sure debug was turned off. Mine is off..

I dont think I've even got around to modifying anything yet.
Can you help?

Thanks.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Olivier! Hope you are doing good today :slight_smile:

    Please try adding below code in wp-config.php file and let us know if you are still getting the warning messages.

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Sajid
    • DEV MAN’s Sidekick

    Hi @ Olivier!

    Hope you are doing good today :slight_smile:

    I am using exact same code and its working fine to me.

    Any way. Remove this line from wp-config.php file and check.

    Also try to run a quick plugin conflict test as illustrated in getting support manual. Some times a plugin or theme can also cause to display warning and error messages even when we have disabled theme in wp-config.php file.
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Stephen
    • Design Lord, Child of Thor

    Hi Guys,

    I had the same problem, adding;

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);

    Worked for me. :slight_smile:

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.