Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#23807 closed defect (bug) (fixed)

PHP Strict Mode : Bulk_Plugin_Upgrader_Skin::before() warning

Reported by: charlestonsw's profile charlestonsw Owned by: ryan's profile ryan
Milestone: 3.6 Priority: normal
Severity: minor Version: 3.5.1
Component: Warnings/Notices Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

This is from core WP 3.5.1 on my dev box while installing the Debug Bar plugin. This is not the first plugin to trigger this message while testing. I do have strict mode and full warnings/debug messages enabled throughout WordPress and PHP.

Strict Standards: Declaration of Bulk_Plugin_Upgrader_Skin::before() should be compatible with that of Bulk_Upgrader_Skin::before() in /var/www/html/wp-admin/includes/class-wp-upgrader.php on line 1359
Strict Standards: Declaration of Bulk_Plugin_Upgrader_Skin::after() should be compatible with that of Bulk_Upgrader_Skin::after() in /var/www/html/wp-admin/includes/class-wp-upgrader.php on line 1359 
Strict Standards: Declaration of Bulk_Theme_Upgrader_Skin::before() should be compatible with that of Bulk_Upgrader_Skin::before() in /var/www/html/wp-admin/includes/class-wp-upgrader.php on line 1394 
Strict Standards: Declaration of Bulk_Theme_Upgrader_Skin::after() should be compatible with that of Bulk_Upgrader_Skin::after() in /var/www/html/wp-admin/includes/class-wp-upgrader.php on line 1394 

Attachments (1)

23807.patch (1.8 KB) - added by charlestonsw 12 years ago.
I believe this patch addresses the problem.

Download all attachments as: .zip

Change History (7)

@charlestonsw
12 years ago

I believe this patch addresses the problem.

#1 @SergeyBiryukov
12 years ago

  • Component changed from Upgrade/Install to Warnings/Notices
  • Description modified (diff)
  • Milestone changed from Awaiting Review to 3.6

#2 @ryan
12 years ago

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

In 23749:

Make the before() and after() methods in Bulk_Plugin_Upgrader_Skin and Bulk_Theme_Upgrader_Skin declarations match Bulk_Upgrader_Skin. Eliminates strict standards warning.

Props charlestonsw
fixes #23807

#3 follow-up: @soulseekah
11 years ago

Does Bulk_Upgrader_Skin also have to match the declarations of the above methods in WP_Upgrader_Skin?

#4 in reply to: ↑ 3 @SergeyBiryukov
11 years ago

Replying to soulseekah:

Does Bulk_Upgrader_Skin also have to match the declarations of the above methods in WP_Upgrader_Skin?

Well, it doesn't produce the strict standards warning, so I guess we're good. As far as I can see, adding new optional arguments in overridden methods is fine, removing or changing existing arguments is not.

#5 @charlestonsw
11 years ago

I believe this patch was already added in a prior release. Not sure why the ticket was not closed but the warning went away in a post 3.5.1 release.

#6 @SergeyBiryukov
11 years ago

The ticket is closed as fixed in 3.6 ([23749]).

Note: See TracTickets for help on using tickets.