[wp-trac] [WordPress Trac] #54009: Image upload fails with ambiguous error.

WordPress Trac noreply at wordpress.org
Wed Aug 25 18:42:12 UTC 2021


#54009: Image upload fails with ambiguous error.
--------------------------+-----------------------------
 Reporter:  quantumzen    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  5.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Error message:
 ''Post-processing of the image failed likely because the server is busy or
 does not have enough resources. Uploading a smaller image may help.
 Suggested maximum size is 2500 pixels.''

 ajax error content:
   Fatal error:  Uncaught TypeError: round(): Argument #1 ($num) must be of
 type int|float,
   string given in C:\***\wp-admin\includes\image.php:844
   Stack trace:
   #0 C:\***\wp-admin\includes\image.php(844): round()
   #1 C:\***\wp-admin\includes\media.php(380): wp_read_image_metadata()
   #2 C:\***\wp-admin\includes\ajax-actions.php(2549):
 media_handle_upload()
   #3 C:\***\wp-admin\async-upload.php(33): wp_ajax_upload_attachment()
   #4 {main} thrown in C:\***\wp-admin\includes\image.php on line 844

 line 844:
 {{{
 $meta['aperture'] = round( wp_exif_frac2dec( $exif['FNumber'] ), 2 );
 }}}

 Images with a meta > camera > aperture of 0 seem to cause this error.
 An aperture value of 0 can occur if the camera is using a manual lens with
 no connector pins, for example an adapted vintage lens.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list