- last update
over 1 year ago 15 pass - last update
over 1 year ago 15 pass - last update
over 1 year ago 15 pass, 2 fail - last update
over 1 year ago 15 pass, 3 fail - last update
over 1 year ago 15 pass - 🇸🇰Slovakia poker10
As far as I know statically declared methods cannot use
$this
whether called statically or not in PHP 7/8. So I think we should safely remove the whole condition and just keep the code creating a new instance ofPHPVideoToolkit
class and calling thegetFFmpegInfo()
. In the patch #5, theif
andelse
branches are now the same, so it will be better to remove it altogether.Patch #2 would not work, because we cannot call non-static method statically in modern PHP versions, see: https://www.php.net/manual/en/migration80.incompatible.php .
I am going to commit the updated patch soon.
- Status changed to Fixed
over 1 year ago 5:16pm 16 June 2023 - 🇸🇰Slovakia poker10
Thanks all, committed!
Just final note - I have not considered removing the function although it seems not used by any code in the Video module. But it can be probably used for example by other contrib modules, so better to keep it there.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
If you need a non-static version that uses
$this->getFFmpegInfo()
, you could have a non-static version of the function that calls the static one and passes in$toolkit
as a param. If$toolkit
is null, get it fromnew PHPVideoToolkit()
. Automatically closed - issue fixed for 2 weeks with no activity.