[wp-trac] [WordPress Trac] #27758: WP_Error data is false in _unzip_file_ziparchive
WordPress Trac
noreply at wordpress.org
Tue Oct 7 05:20:32 UTC 2014
#27758: WP_Error data is false in _unzip_file_ziparchive
-----------------------------+------------------------------
Reporter: ruud@… | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.7
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by dd32):
One option here is to simply strip `WP_CONTENT_DIR` out of the `$_dir`,
another is to just use the basename() but that'll be possibly just as
confusing.
For example, this would return 'wp-content/upgrade' as the error data if
it failed to create that directory:
{{{
return new WP_Error(
'mkdir_failed_ziparchive',
__( 'Could not create directory.' ),
( $_dir == $to ) ? str_replace( dirname( WP_CONTENT_DIR ), '', $_dir
) : substr( $_dir, strlen( $to ) )
);
}}}
> I assumed with 'actually aggregated by WordPress.org' that you meant
that the error codes where somehow submitted/returned to wordpress.org for
analysis and such.
That is correct, it's handled far above the underlying upgrade functions
for things like auto updates.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27758#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list