Make WordPress Core

Opened 3 weeks ago

Last modified 2 weeks ago

#63357 new defect (bug)

Error function exif_imagetype() functions.php on line 3338

Reported by: devnguyentien's profile devnguyentien Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: reporter-feedback
Focuses: Cc:

Description

I have error with "exif_imagetype(): Stream does not support seeking in" at wp-includes/functions.php on line 3338. i Change getimagesize then it works fine.

Change History (5)

#1 @ankitmaru
2 weeks ago

Hi @devnguyentien ,

thanks for reporting this.

  1. Could you please share a little more detail to help us understand the issue better?
  2. What kind of file were you uploading when you saw the error? (An image or something else?)
  3. Were you uploading it through the normal WordPress media uploader, or another way?
  4. Was the file from your local computer, or from somewhere else like an external server?

Also, which WordPress and PHP versions are you using?

This info will really help me figure out what’s going wrong.
Thanks so much

#2 @SergeyBiryukov
2 weeks ago

  • Component changed from General to Media

#3 @devnguyentien
2 weeks ago

I am using wordpress version 6.8, having error when loading images from other websites. I am using php 8.2

#4 @devnguyentien
2 weeks ago

In the function file at wp-include I edited line 3338 and replaced exif_imagetype with getimagesize and everything worked fine.

#5 @SirLouen
2 weeks ago

  • Keywords reporter-feedback added

Reproduction Report

Description

❌ This report can't validate that the issue can be reproduced.

Environment

  • WordPress: 6.8-src
  • PHP: 8.2.28
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 135.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-One 2.5
  • MU Plugins: None activated
  • Plugins:
    • Hello Dolly 1.7.2
    • Test Reports 1.2.0
    • WP_Query Tester 1.0.0

Bug Reproduction Steps

  1. Set PHP 8.2 and WP 6.8
  2. Go to add a post
  3. Pick an external image. Like this: https://hips.hearstapps.com/hmg-prod/images/dog-puppy-on-garden-royalty-free-image-1586966191.jpg
  4. Add an image block and insert from URL
  5. ❌ Image is added without troubles
  6. Video Attached

Actual Results

  1. ❌ Error condition doesn't occur

Additional Notes

  • @devnguyentien create a new WP installation or use WP Playground to test, and try again from scratch

https://playground.wordpress.net/?php=8.2&wp=6.8

  • Probably you have some other plugin or theme or custom function that is causing the conflict
  • Or maybe the problem is with the type of file. In this example I'm using a JPG
  • Provide the image file you are using, but first test it in the Playground to see if you can reproduce it.

Supplemental Artifacts

Demo Video: https://streamable.com/79z717

Note: See TracTickets for help on using tickets.