#54009 closed defect (bug) (duplicate)
Image upload fails with ambiguous error.
Reported by: | quantumzen | Owned by: | adamsilverstein |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.8 |
Component: | Media | Keywords: | php8 |
Focuses: | Cc: |
Description (last modified by )
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.
Attachments (2)
Change History (8)
#2
@
3 years ago
- Description modified (diff)
- Keywords php8 added
- Milestone changed from Awaiting Review to 5.9
Hi there, welcome to WordPress Trac! Thanks for the report.
This seems related to PHP 8.0, adding the keyword.
#4
@
3 years ago
- Owner set to adamsilverstein
- Status changed from new to assigned
Hi @quantumzen - I started working on https://core.trac.wordpress.org/ticket/54385 and it looks like this is the same issue.
If possible, can you test the patch from that ticket to verify it fixes your upload issue? (it did in my testing) - https://core.trac.wordpress.org/attachment/ticket/54385/54385.2.diff
#5
@
3 years ago
- Milestone 5.9 deleted
- Resolution set to duplicate
- Status changed from assigned to closed
Closing as a duplicate of #54385 where we are working on this issue.
Hi @quantumzen thanks for the detailed bug report. Can you provide a sample image that causes the error? That way we can reproduce the issue and test out proposed fixes.