Warning php messages when setting instructor permission

I'm receiving some alerts when I try to modify instructor permissions from CoursePress Pro>Settings, like this one:

Warning: Invalid argument supplied for foreach() in /web/htdocs/www.******.it/home/wp-content/plugins/coursepress/includes/admin-pages/settings-instructor-capabilities.php on line 25
Same messages with the difference at the end of the string... on line 30, on line 29, etc.

(Sorry for censored marks on the Domain name. Obviously I have read and made all the tips you suggest in "before you post".)

Thank you

  • Michael Bissett

    Hey @David, welcome to the WPMU DEV Community, hope you're doing well this evening! :slight_smile:

    Would you happen to have WP_DEBUG set to "true" (without quotes) inside your wp-config.php? If so, could you try setting it to "false" (without quotes) please, and seeing if this message shows up?

    I'm not seeing this message show up on my test site, even after trying various combinations of Instructors settings, have you also checked to see if another plugin might be causing this? We've got a handy troubleshooting flowchart that you can follow here:


    Another thing that you could try would be disabling & re-enabling CoursePress Pro, just to see if that clears anything out here. :slight_smile:

    Let me know if I can be of further assistance please!

    Kind Regards,

  • Timothy Bowers

    Hey there David,

    In posting this question through the Dashboard, or selecting the site through the Q&A form we're able to see the domain and can already.

    Without direct access it could make debugging a much longer process.

    I've also tested this, from my site it all looks fine and I get no errors. I also had WP_DEBUG enabled.

    Can you please provide screenshots of the settings pages, and the especially the capabilities page for instructors? And the same for the lightbox?

    We'll then try and replicate the set up to see if that helps.

    Take care.

  • Adam Czajczyk

    Hello David,

    Hope you're well and I'm sorry for the delay!

    From what you're saying I understand that those php warnings messages are no longer an issue? Just as a side note: warnings often doesn't cause problems as they may be a result of a too strict php configuration or other "soft incompatibilities" that sometimes occur. Anyway, if everything runs well you may want to disable WordPress debug mode by setting "WP_DEBUG" flag in wp-config.php back to "false".

    If it comes to your new question, I've tested it on my test install and couldn't reproduce such behaviour. That being said, could you please open a new thread regarding this issue? It would help us better track the topic and work-out the solution faster.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.