Closed (fixed)
Project:
PHP FFmpeg
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2017 at 17:04 UTC
Updated:
13 Jul 2020 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
trangunghoa commentedComment #3
pbuyle commentedCan you provide the full stack trace for the error?
Comment #4
robin.ingelbrecht commentedI have the same issue. This is the full stack trace:

Comment #5
ultimikeThis is actually a bigger deal than it seems, as it can lead to ffprobe and ffmpeg not being loaded in certain circumstances.
I believe the issue is that this module provides a cache for the phpffmpeg library, but data being returned to ffmpeg needs to be a string, while Drupal's cache normally returns and object.
The attached patch fixed the issue for me.
-mike
Comment #6
berdircache->get() either returns an object or nothing, there is no reason to ever return $return. The common pattern for this would be something like this:
if ($cache = $this->cache->get($this->getCid($id)) {
return $cache->data;
}
Comment #7
primsi commentedUpdated the patch. I still left the return FALSE fallback because \Doctrine\Common\Cache\Cache seems to define it.
Comment #8
berdirYes, keeping that makes sense.
Comment #9
introfini commentedApplying the patch #11 fixes this crash. Thanks!
Fatal error: Uncaught Error: Call to undefined method stdClass::has() in /app/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php on line 254 ...Comment #10
mhavelant commented