[wp-trac] [WordPress Trac] #39774: php 7.1 media uploader bug
WordPress Trac
noreply at wordpress.org
Fri Feb 3 19:17:59 UTC 2017
#39774: php 7.1 media uploader bug
--------------------------+--------------------
Reporter: drrobotnik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.3
Component: Upload | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+--------------------
Comment (by drrobotnik):
Hey @SergeyBiryukov,
Null shouldn't hurt anything, but yeah that makes sense. I was looking at
an empty string and thinking unset.
I've attached the updated patch.
While I was testing the change I came across another issue a few lines
down:
`PHP Fatal error: Maximum execution time of 30 seconds exceeded in /wp-
includes/functions.php on line 2098`
{{{#!php
<?php
while ( file_exists( $dir . "/$filename" ) ) {
if ( '' === "$number$ext" ) {
$filename = "$filename-" . ++$number;
} else {
$filename = str_replace( array( "-$number$ext", "$number$ext" ),
"-" . ++$number . $ext, $filename );
}
}
}}}
It was fixed by changing while() to if(). I see a few of these in
functions.php. What's odd was it only happened when I uploaded a gif (963
KB), but not when I uploaded a jpg (1.3 MB). Should I open a separate
ticket?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39774#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list