CoursePress Pro Error

Hi Gurus,

Just updated CoursePress and now I get the following error:

Warning: array_filter() expects parameter 1 to be array, string given in /home/ecoevolv/public_html/growing/wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php on line 2004

On Page:

If you could look into this please, and thank you .

  • Nastia
    • Support Rock Star

    Hello emilio_gagliardi , trust you're doing well!

    I can replicate the same on my installation and I've flagged this as a bug to our developers. In the meantime, please edit the wp-config.php file and change this line:
    define( 'WP_DEBUG', true );
    to this:
    define( 'WP_DEBUG', false );

    This should hide the warning for logged out users.

    Kind regards,

  • Sajid
    • DEV MAN’s Sidekick

    Hello Shalaka,
    Hope you are doing good today :slight_smile:

    In addition to above, try adding the following code in wp-config.php file instead.

    define('WP_DEBUG', false);


    // 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 );

    This code will enable debugging but would not display error messages on screen.

    If you are still getting this issue then there is any other plugin, theme or any script on your site that is forcing the errors to display. In this case, I would suggest you making a plugin/theme conflict test to find that out and remove that code that is displaying the messages on screen.

    For future reference, if existing response of staff does not solve your problem then please create your own ticket instead of posting in that thread. You can include the thread link in your own ticket for reference. This helps us manage each issue in its own ticket and also helps prevent spamming the original poster.

    Thanks and have a nice day :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

  • Shalaka
    • WPMU DEV Initiate

    Thanks Sajid,

    That worked. The warnings are not displaying anymore. But I would like to know, what caused the warnings in the first place?
    We are just hiding it for now.. How do we stop them totally.

    Thanks once again. have a nice day !


  • Sajid
    • DEV MAN’s Sidekick

    Hello Shalaka :slight_smile:

    Hope you had a great weekend!

    That is a bug in CoursePress Pro plugin. I have reported it to developer already (forgot to mention in my previous reply - Sorry) so hopefully it will get fixed in future version of this plugin.

    Best Regards,
    Sajid - WPMU DEV Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.