[wp-trac] [WordPress Trac] #32164: wp_tempnam gets into loop on ".maintenance" filename
WordPress Trac
noreply at wordpress.org
Tue Apr 28 13:04:38 UTC 2015
#32164: wp_tempnam gets into loop on ".maintenance" filename
-----------------------------+-----------------------------
Reporter: ridderr | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.2
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
During update to WP4.2.1 wp_tempnam gets into a loop when filename is
".maintanance".
Error logged is: Allowed memory size of 268435456 bytes exhausted (tried
to allocate 65488 bytes) in /home/pi/wordpress/wp-admin/includes/file.php
on line 159
I could solve this by adding the following:
if ( ! $temp_filename ) {
/** begin added code **/
if (dirname ($filename) == "/")
return dirname ($dir . "x") . $filename;
else
/** end added code **/
return wp_tempnam( dirname( $filename ), $dir );
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32164>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list