WordPress.org

Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 10 months ago

#23807 closed defect (bug) (fixed)

PHP Strict Mode : Bulk_Plugin_Upgrader_Skin::before() warning

Reported by: charlestonsw Owned by: 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 16 months ago.
I believe this patch addresses the problem.

Download all attachments as: .zip

Change History (7)

charlestonsw16 months ago

I believe this patch addresses the problem.

comment:1 SergeyBiryukov16 months ago

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

comment:2 ryan16 months 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

comment:3 follow-up: soulseekah10 months ago

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

comment:4 in reply to: ↑ 3 SergeyBiryukov10 months 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.

comment:5 charlestonsw10 months 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.

comment:6 SergeyBiryukov10 months ago

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

Note: See TracTickets for help on using tickets.