Skip to:
Content

Opened 4 years ago

Closed 2 months ago

#4267 closed defect (bug) (worksforme)

PHP 5.4 warning with BP 1.6 - Creating default object from empty value

Reported by: enderandrew Owned by:
Milestone: Priority: normal
Severity: minor Version: 1.5.5
Component: Core Keywords: needs-refresh has-patch
Cc:

Description

I'm testing BP 1.6 SVN with WP 3.4 and PHP 5.4 and I'm seeing some PHP warning.

PHP Warning: Creating default object from empty value in /var/www/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php on line 227
PHP Warning: Creating default object from empty value in /var/www/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-screens.php on line 157
PHP Warning: Creating default object from empty value in /var/www/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 344
PHP Warning: Creating default object from empty value in /var/www/wp-content/plugins/buddypress/bp-members/bp-members-screens.php on line 70

Attachments (1)

4267.diff (3.1 KB) - added by enderandrew 4 years ago.
Here's a patch.

Download all attachments as: .zip

Change History (4)

#1 @DJPaul
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

It is because PHP 5.4 has enabled E_STRICT warnings by default. We don't really have a policy of adhering to E_STRICT in BP or WP, but we can get these done.

@enderandrew
4 years ago

Here's a patch.

#2 @tw2113
3 months ago

  • Keywords needs-refresh has-patch added; needs-patch removed

#3 @DJPaul
2 months ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

We run tests to capture this kind of problem nowadays, and this was long ago fixed.

Note: See TracTickets for help on using tickets.