Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#23807 closed defect (bug) (fixed)

PHP Strict Mode : Bulk_Plugin_Upgrader_Skin::before() warning

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

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 14 years ago.
I believe this patch addresses the problem.

Download all attachments as: .zip

Change History (7)

@charlestonsw
14 years ago

I believe this patch addresses the problem.

#1 @SergeyBiryukov
14 years ago

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

#2 @ryan
14 years ago

  • Owner set to ryan
  • Resolution → fixed
  • Status new → 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
13 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
13 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
13 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
13 years ago

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

Note: See TracTickets for help on using tickets.