News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error on image upload

Started by Pyrhel, February 13, 2022, 11:16:50 AM

Previous topic - Next topic

Pyrhel

When I try to upload small PNG file (130kb) I'm getting:

QuoteFatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in /forum/Sources/Post.php:2219 Stack trace: #0 /forum/Sources/Post.php(2219): vsprintf('There was a pro...', '30B0F9FD.PNG') #1 /forum/index.php(187): Post2() #2 {main} thrown in /forum/Sources/Post.php on line 2219

I don't know where to start from. Any help will be appreciated!

Sesquipedalian

Although it does look like there's something wrong with the image you are trying to upload, the error message isn't directly about that. Instead, this error message indicates a bug in the code that is supposed to tell you about what went wrong uploading your image.

Therefore, I am moving this to the Bug Reports board and opening a new issue about this on GitHub: #7320

In order to help us reproduce the issue, could you please attach a copy of the relevant PNG file in a reply to that GitHub issue report?
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Pyrhel

I've uploaded one of the images causing problems, but I'm sure the error is not from the image itself. This error happens no matter what image I'm trying to upload.

My forum had a resizing mod installed before updating and the only reason I can think of is something is left after the update.

Pyrhel

There's progress on the error. My forum was running on PHP 8.0 and because of another problem I've downgraded to 7.4 and tested again.

Now, when trying to upload a new photo I'm getting:
Quote3.jpg There was a problem during the uploading of 3.jpg.
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator. 86.3 KB
You cannot view this attachment.

Then I removed the security checks on the images and now everything works.

I'm going to post the same report in the github bug.

Advertisement: