[wp-trac] [WordPress Trac] #29470: Language Pack Upgrader can produce a fatal error
WordPress Trac
noreply at wordpress.org
Tue Sep 2 18:15:01 UTC 2014
#29470: Language Pack Upgrader can produce a fatal error
-------------------------------------------+------------------
Reporter: ocean90 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Upgrade/Install | Version: 3.7
Severity: normal | Resolution:
Keywords: has-patch commit dev-reviewed | Focuses:
-------------------------------------------+------------------
Description changed by ocean90:
Old description:
> Language_Pack_Upgrader::bulk_upgrade() produces a fatal error when we
> can't create the language dir. Language_Pack_Upgrader::upgrade() is just
> a wrapper for Language_Pack_Upgrader::bulk_upgrade() and returns the
> first item from $result. That works if $result is an array or even false,
> but not if it's a WP_Error object.
>
> `Fatal error: Cannot use object of type WP_Error as array in /src/wp-
> admin/includes/class-wp-upgrader.php on line 1229`
>
> Introduced in [25633]/#22704.
New description:
Language_Pack_Upgrader::bulk_upgrade() returns a WP_Error object when we
can't create a language dir.
Language_Pack_Upgrader::upgrade() is just a wrapper for
Language_Pack_Upgrader::bulk_upgrade() and returns the first item from
$result. That works if $result is an array or even false, but not if it's
a WP_Error object:
`Fatal error: Cannot use object of type WP_Error as array in /src/wp-
admin/includes/class-wp-upgrader.php on line 1229`
Introduced in [25633]/#22704.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29470#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list