Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#59590 closed defect (bug) (fixed)

PHP error in class-wp-plugins-list-table.php after r56599

Reported by: petitphp's profile petitphp Owned by: costdev's profile costdev
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.4
Component: Administration Keywords: has-patch commit
Focuses: administration Cc:


Originally reported in #57791 by TobiasBg

With an incompatible PHP version (just set a plugin's "Requires PHP" header to e.g. 8.4), I'm now getting

Uncaught ArgumentCountError: 2 arguments are required, 1 given in /var/www/html/wordpress/wp-admin/includes/class-wp-plugins-list-table.php:1282

This is caused by the removal of the comma at the end of line 1285 in wp-admin/includes/class-wp-plugins-list-table.php, which was done in, when only the HTML code should have been removed. printf() has only one argument then.

Attachments (1)

59590.diff (652 bytes) - added by sabernhardt 6 months ago.
diff from PR 5456

Download all attachments as: .zip

Change History (11)

#1 @petitphp
6 months ago

Props to @TobiasBg for reporting the issue.

#2 @TobiasBg
6 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.4

#3 @TobiasBg
6 months ago

#59589 was marked as a duplicate.

This ticket was mentioned in PR #5456 on WordPress/wordpress-develop by @sabernhardt.

6 months ago

  • Keywords has-patch added; needs-patch removed

Combines markup on the same line and restores the comma removed in r56599.

Trac 59590

@petitphp commented on PR #5456:

6 months ago

@sabernhardt There are a lot of unrelated merge commits, can you try rebasing your branch to the latest version of trunk ?

#6 @costdev
6 months ago

  • Keywords commit added
  • Owner set to costdev
  • Status changed from new to reviewing

Thanks for creating the ticket @petitphp , for reporting it @TobiasBg and for patching it @sabernhardt.

While this just needs a . replaced with a comma, merging the two strings make sense here.

Self-assigning for commit.

6 months ago

diff from PR 5456

@sabernhardt commented on PR #5456:

6 months ago

I tried rebasing within GitHub Desktop, but it did not change the PR. If it might help, I uploaded the diff from this PR.

#8 @mukesh27
6 months ago

Thanks @sabernhardt PR looked good to me too, and it got enough approvals.

#9 @costdev
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 56824:

Plugins: Fix broken sprintf() call in plugins list table.

In [56599], a sprintf() call was modified which resulted in an insufficient number of arguments.
This caused a Fatal Error when an incompatible plugin notice was displayed.

This fixes the sprintf() call.

Follow-up to [56599].

Props petitphp, TobiasBg, sabernhardt, mukesh27.
Fixes #59590. See #57791.

@sabernhardt commented on PR #5456:

6 months ago

Committed in r56824

Note: See TracTickets for help on using tickets.