Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#30899 closed defect (bug) (duplicate)

PHP Strict Warning: Redefining already defined constructor for class WP_Widget

Reported by: toby86's profile toby86 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Widgets Keywords:
Focuses: Cc:

Description

This is probably a follow-up to #20801 which should have fixed this error...

I get this error on my current wordpress installation after upgrading from 4.0 to 4.1:

Strict Standards: Redefining already defined constructor for class WP_Widget
in /var/www/vhosts/jpbw.de/httpdocs/v3/wp-includes/widgets.php on line 175 

This is my environment:

  • Ubuntu 10.04 LTS 64bit
  • PHP 5.3.2-1ubuntu4.28 with Suhosin-Patch
  • mysql Ver 14.14 Distrib 5.1.73

Change History (3)

#1 @dd32
9 years ago

PHP 5.3.2-1ubuntu4.28 with Suhosin-Patch

I believe this is fixed in PHP, although not in such an old version as 5.3.2 (Ubuntu probably back ports security fixes, not bug fixes), Try upgrading PHP and see if you're still seeing it.

See https://bugs.php.net/bug.php?id=52160&edit=3
Unfortunately they don't really go into details as to what the solution was, and I can't find a diff view of the relevant changeset, so I'm just going to assume that they no longer issue an E_STRICT for that case.

#2 @SergeyBiryukov
9 years ago

Could not reproduce the warning on PHP 5.3.28 or 5.4.29.

#3 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #20801.

Going to mark this as a duplicate of the previous ticket then.

There's nothing we can do to avoid the strict standards warning in older PHP without breaking backwards compatibility, and since it should only be shown to Developers with display_errors on (and WP_DEBUG) I'd encourage them to develop with a more modern PHP (or at least a stable release in the older branch).

Note: See TracTickets for help on using tickets.