"Unsupported operand types" error while uploading video #2222

Open
opened 2026-10-05 01:10:14 +02:00 by adam · 3 comments
Owner

Hello

when uploading a webm video, it seems the upload works, the upload reachs 100%, but then there is not automatic redirect to the confirmation page. Additionally the videos are nowhere to be found in the gallery, no entry in database, but the files are present on disks.

When viewing the application logs I see

FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /app/www/public/admin/include/functions_upload.inc.php:779

This is in fact this line

https://github.com/Piwigo/Piwigo/blob/2357a86d51b315b846884e9f77076a82ccdbd1f2/admin/include/functions_upload.inc.php#L770

I think the output of the exec command must be explicitely cast to number.

Also the upload manager is clearly not handling this error at all.


For context I am running LinuxServer.io Docker image, not the official one.

  • Piwigo 16.4.0
  • Système d'exploitation: Linux
  • Container info: (unofficial) LinuxServer.io 16.4.0-ls346
  • PHP: 8.4.16
  • MySQL: 12.3.2-MariaDB-ubu2404 [2026-06-23 23:18:12]
  • Bibliothèque graphique: External ImageMagick 7.1.2-15
Hello when uploading a webm video, it seems the upload works, the upload reachs 100%, but then there is not automatic redirect to the confirmation page. Additionally the videos are nowhere to be found in the gallery, no entry in database, but the files are present on disks. When viewing the application logs I see > FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /app/www/public/admin/include/functions_upload.inc.php:779 This is in fact this line https://github.com/Piwigo/Piwigo/blob/2357a86d51b315b846884e9f77076a82ccdbd1f2/admin/include/functions_upload.inc.php#L770 I think the output of the exec command must be explicitely cast to number. Also the upload manager is clearly not handling this error at all. --- For context I am running LinuxServer.io Docker image, not the official one. - Piwigo 16.4.0 - Système d'exploitation: Linux - Container info: (unofficial) LinuxServer.io 16.4.0-ls346 - PHP: 8.4.16 - MySQL: 12.3.2-MariaDB-ubu2404 [2026-06-23 23:18:12] - Bibliothèque graphique: External ImageMagick 7.1.2-15 <!-- github-sync-id:4729632965 -->
Author
Owner

Some additional info that might be important : this particular webm video has no duration information (because it is from a stream).

The ffprobe command return N/A, so it is not a casting issue, but rather a value validation issue.

Some additional info that might be important : this particular webm video has no duration information (because it is from a stream). The ffprobe command return `N/A`, so it is not a casting issue, but rather a value validation issue. <!-- github-comment-id:4783638493 -->
Author
Owner

Hello
Do you have ffmpeg ?
Do you have authorize typemime for webm ?
Thx

Hello Do you have ffmpeg ? Do you have authorize typemime for webm ? Thx <!-- github-comment-id:4784172501 -->
Author
Owner

Yes and yes.

As I said it is the ffprobe command that does not return a number, it should be checked to avoid crashing the upload.

Yes and yes. As I said it is the ffprobe command that does not return a number, it should be checked to avoid crashing the upload. <!-- github-comment-id:4786665200 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#2222