This is interresting to know this new one, because another user had it once but I cannot reproduce it.
Same, this is the PHP version which is responsable.
First of all, try to decompose the code in few lines in order to find where the error is.
Then if you can tell me more, I will be able to do the fix (very easy to change some lines of code)
The source code is absolutely correct, but for previous versions of PHP it lacks.
Sometimes PHP needs a temporary var. For instance PHP refuse :
if (empty(myFunction())){}...
It should be
$result = myFunction();
if (empty($result)){}...
Just as an example to decompose.
I don't know how to fix this one because I can't raise the issue.
If you sort this out, let's share the solution here.
In definitive, if really nothing work, just fork the concerned function, and bypass the buggy code.
Because this function is not used yet by your component. It is about the images treatement for advanced grafical filters. It is a preparation for future feature.
At the moment, the code is useless for you.