Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#24747 closed defect (bug) (fixed)

Strict Standards errors on plugin search

Reported by: DrewAPicture Owned by: westi
Milestone: 3.6 Priority: normal
Severity: normal Version: 2.7
Component: Plugins Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description (last modified by DrewAPicture)

A user in Alpha/Beta reported getting Strict Standards errors doing a plugins search in Plugins > Add New. He first tried on Beta4, then again on RC1.

He's running PHP 5.4.7 (full stack)

The error(s):

"Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\wpbeta\wp-admin\includes\plugin-install.php on line 232"

His search string:


Unfortunately, I don't have a PHP 5.4 install to try and reproduce it on, so maybe somebody else here can give it a go. I couldn't reproduce it on PHP 5.3.5, not sure what version @mordauk tested on.

Attachments (1)

24747.patch (1.1 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 @DrewAPicture2 years ago

  • Description modified (diff)

comment:2 @DrewAPicture2 years ago

  • Description modified (diff)

comment:3 @adiant2 years ago

  • Cc jon@… added

@SergeyBiryukov2 years ago

comment:4 follow-up: @SergeyBiryukov2 years ago

  • Keywords has-patch added; dev-feedback 2nd-opinion removed
  • Version changed from trunk to 2.7

Introduced in [9793]. The fix is the same as in [19072] and [19074].

comment:5 in reply to: ↑ 4 ; follow-up: @DrewAPicture2 years ago

Replying to SergeyBiryukov:

Introduced in [9793]. The fix is the same as in [19072] and [19074].

Cool. Is this is a PHP version-specific thing -- in other words -- how would one reproduce this?

comment:6 @adiant2 years ago

Further testing indicates that this error message appears whenever the search for plugins includes a plugin that is already installed. All that said, I have not yet been able to reproduce the error on the Linux shared hosting that I use "for Production".

comment:7 in reply to: ↑ 5 @SergeyBiryukov2 years ago

Replying to DrewAPicture:

Cool. Is this is a PHP version-specific thing -- in other words -- how would one reproduce this?

I can reproduce in PHP 5.3 by setting error_reporting( E_ALL | E_STRICT ) in a mu-plugin.

In PHP 5.4, E_ALL includes E_STRICT, so just define('WP_DEBUG', true) in wp-config.php is enough.

As noted in comment:6, the message only appears for already installed plugins that don't have an update yet.

comment:8 @SergeyBiryukov2 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.6

comment:9 @aaroncampbell2 years ago

24747.patch looks good to me. Tested and confirmed error before the patch and fixed after.

comment:10 @nacin2 years ago

  • Keywords dev-reviewed added

comment:11 @westi2 years ago

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

In 24725:

Fix a strict standards error in the plugin search when search for an already installed plugin.

Fixes #24747 props SergeyBiryukov.

Note: See TracTickets for help on using tickets.