Skip to:
Content

Opened 8 years ago

Closed 8 years ago

#3148 closed enhancement (fixed)

BP_Core_User constructor not 5.3.3 >= friendly

Reported by: Backie Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Core Keywords: has-patch
Cc:

Description

In PHP 5.3.3 release the use of PHP 4 constructors would not longer be acceptable.

Solution for PHP 4 compatibly is to rename method to PHP 5 style and then have a PHP 4 constructor function which calls the PHP 5 method.

ps: Will patch once I finish the phpDocs

Attachments (3)

3148.diff (581 bytes) - added by Backie 8 years ago.
3148-2.diff (17.1 KB) - added by Backie 8 years ago.
3148-3.diff (3.9 KB) - added by Backie 8 years ago.

Download all attachments as: .zip

Change History (10)

@Backie
8 years ago

#1 @cnorris23
8 years ago

It probably wouldn't hurt to audit the other files to check for this. Unless of course you already have :) If you can't get to it, I'll try to whip something up tonight.

#2 @Backie
8 years ago

I've noticed another one in the same file BP_Core_Notification, started phpDocs so gonna wait until I finish that before I start auditing the other files if I have time. If not I'll do it tomorrow.

#3 @DJPaul
8 years ago

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

A patch getting all of these would be great

@Backie
8 years ago

#4 @Backie
8 years ago

  • Keywords has-patch added; needs-patch removed

Patch also fixes an incompatibly with WordPress 3.2 where class BPDB calls WPDB() as the parent constructor which has been removed.

#5 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4211]) Add PHP5-style constructors to classes. Fixes #3148, props Backie

@Backie
8 years ago

#6 @Backie
8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Oops I some how managed to miss out 3 files. Added patch for missing classes.

#7 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [4216]) Add PHP5-style constructors to more classes. Fixes #3148 again, props Backie

Note: See TracTickets for help on using tickets.