[wp-trac] [WordPress Trac] #53284: `error()` method passed too many parameters
WordPress Trac
noreply at wordpress.org
Fri Jan 7 17:53:41 UTC 2022
#53284: `error()` method passed too many parameters
--------------------------------------+----------------------------
Reporter: desrosj | Owner: davidbaumwald
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.0
Component: Upgrade/Install | Version: 3.7
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+----------------------------
Changes (by davidbaumwald):
* owner: (none) => davidbaumwald
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"52539" 52539]:
{{{
#!CommitTicketReference repository="" revision="52539"
Upgrade/Install: Fix parameter count in `error` call when an automatic
core upgrade fails.
During automatic core upgrades, if installation results in a `WP_Error`,
the `error` method is called on the skin with the details. However, in
this case, two parameters are passed to `$skin->error`, but only one is
accepted. This change passes only the running `WP_Error` instance as the
sole parameter to `$skin->error`.
Also, this change adds an additional error to `$upgrade_result` before
finally being passed to `$skin->error`, indicating that the installation
failed. This adds additional context to the failure.
Props desrosj, sainthkh, devutpol, SergeyBiryukov.
Fixes #53284.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53284#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list