Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24747 closed defect (bug) (fixed)

Strict Standards errors on plugin search

Reported by: drewapicture's profile DrewAPicture Owned by: westi's profile 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:

http://localhost/wpbeta/wp-admin/plugin-install.php?tab=search&s=jonradio&plugin-search-input=Search+Plugins

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 11 years ago.

Download all attachments as: .zip

Change History (12)

#1 @DrewAPicture
11 years ago

  • Description modified (diff)

#2 @DrewAPicture
11 years ago

  • Description modified (diff)

#3 @adiant
11 years ago

  • Cc jon@… added

#4 follow-up: @SergeyBiryukov
11 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].

#5 in reply to: ↑ 4 ; follow-up: @DrewAPicture
11 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?

#6 @adiant
11 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".

#7 in reply to: ↑ 5 @SergeyBiryukov
11 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.

#8 @SergeyBiryukov
11 years ago

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

#9 @aaroncampbell
11 years ago

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

#10 @nacin
11 years ago

  • Keywords dev-reviewed added

#11 @westi
11 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.