Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported operand types #179

Closed
adonix-dev opened this issue Nov 3, 2021 · 2 comments · Fixed by #229
Closed

Unsupported operand types #179

adonix-dev opened this issue Nov 3, 2021 · 2 comments · Fixed by #229

Comments

@adonix-dev
Copy link

Hi,

I got an issue when accessing the VideoJS tab of a video.
image

PHP Page says : ./admin.php?page=plugin&section=piwigo-videojs/admin/admin_photo.php&image_id=74
Fatal error: Uncaught Error: Unsupported operand types in /var/www/html/piwigo/plugins/piwigo-videojs/include/exiftool.php:58 Stack trace: #0 /var/www/html/piwigo/plugins/piwigo-videojs/admin/admin_photo.php(109): include() #1 /var/www/html/piwigo/admin/plugin.php(53): include_once('/var/www/html/p...') #2 /var/www/html/piwigo/admin.php(298): include('/var/www/html/p...') #3 {main} thrown in /var/www/html/piwigo/plugins/piwigo-videojs/include/exiftool.php on line 58

@flth
Copy link

flth commented Feb 28, 2022

easy fix for this.
open plugins/piwigo-videojs/include/exiftool.php, go to line 58 which looks like
$exif['duration'] = round($general['Duration']*1000, 0);
and replace it with
$exif['duration'] = round((int)$general['Duration']*1000, 0);

tested with Piwigo 12.2.0 and PHP 8.0

@RenaeMacLeod
Copy link

This worked for me, thanks! Just need to work around the read-only nature of my directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants