Intervention / imagecache

Caching extension for the Intervention Image Class

Home Page:https://image.intervention.io/v2/usage/cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using intervention object

skechele opened this issue · comments

Hi,

if try to make a new Intervention Object from a existing one, inside the cache, it fails on my Linux System (not on windows though)
intevention

This would be how it is called:

Intervention::cache(function($image) use($width) {
            $image = $image->make($this->interventionObject);
            $image->resize($width, null, function ($constraint) {
                $constraint->aspectRatio();
            });
        }, 1440, true);

Is it a bug or is my Linux System somehow messed up?

Have you found out why this happens? Current workaround:

  1. Open ImageCache.php.
  2. Find line "if ($this->isFile($data)) {".
  3. Insert before that line, this one "if (strlen($data)<4096)".

I think it's just a "bug" in the is_file-Function. Didnt really know what to do, so I just forked it and applied a fix.
You can find my fix for it here: skechele@9ff8956

Included workaround of @skechele.