boonebgorges / bp-groupblog

BuddyPress Groupblog
GNU General Public License v3.0
15 stars 10 forks source link

Creating default object from empty value #18

Closed markpea closed 9 years ago

markpea commented 11 years ago

php 5.4 now seems to have more strict standards. So I get this persistent error message in my error log:

[Mon Dec 10 10:47:47 2012] [error] [client 159.28.7.70] PHP Warning: Creating default object from empty value in /usr/home/markp/www/esp/wp-content/plugins/bp-groupblog/bp-groupblog.php on line 83,

83 $bp->groupblog->image_base = WP_PLUGIN_DIR . '/bp-groupblog/groupblog/images';

kaymmm commented 11 years ago

quick fix is to add this before line 83:

if ( ! is_object($bp->groupblog) ) {
    $bp->groupblog = new stdClass;
}