Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error in groups.class.php on line 43 in new installation, BP 1.63 #97

nikushev opened this Issue · 11 comments

5 participants


On a new installation I receive "Warning: Creating default object from empty value in E:\Etc\www\wp-content\plugins\buddypress-courseware\groups\groups.class.php on line 43"

I receive the same error in courses.class.php on line 347 on course description page.

Media upload and media gallery stop working after courseware activation as well - after deactivation work fine.

The problem is present in the support tab on plugin download - several people are complaining about it.

WP 3.5, BP 1.63, Courseware 0.9.7, PHP 5.4, MySQL 5, Apache, windows 7, localhost


Thank you for the report, I'll take a look asap.


Further examination of the problem proved it to be php 5.4 connected. I've been able to fix groups.class.php by adding:

if ( !isset( $bp->courseware ) || !is_object($bp->courseware)) {
$bp->courseware = new stdClass;

just before line 43.

Image upload and media gallery started working, but I still haven't find a way to fix courses.class.php line 347 (on course description page):

$old_course->terms = wp_get_object_terms($old_course->ID, 'group_id' );

and a nasty error "BuddyPress Courseware Error! Cheatin' Uh?" appears after clicking course description inside courseware tab. The only way to reach it without that error is by clicking the "Edit course" button.


hi nikushev from your above mentioned condition I found my solution I was also facing the same problem in groups.class.php at line 43 now the error is fixed and my site is working fine.

This was referenced

Please shojil tell us how do you fix it !
I have the same message for the line 43 and 44
Warning: Creating default object from empty value in /wp-content/plugins/buddypress-courseware/groups/groups.class.php on line 43

Warning: Creating default object from empty value in /wp-content/plugins/buddypress-courseware/groups/groups.class.php on line 44
Thank you


Thank you but can you tell me in which file should I add this and at which line. I'm not an expert, but with more details it should be good. Thank you again.


Thank you so much! That fixed it immediately


Guys, @shojil, anyone care to prepare a patch/PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.