After updating to Kirby 3.7 and k3-image-clip 3.1, I started seeing an error message in all blocks where I use Image Clip:
Argument 1 passed to mullema\File::setClip() must be of the type array, null given, called in /site/site/plugins/k3-image-clip/fieldMethods/toImages.php on line 38
I could fix the error message by passing an empty array instead of null to setClip on the toImages method, line 38:
from $clipfile->setClip($clip ?? null); to $clipfile->setClip($clip ?? []);
I am not sure if this change has any repercussions elsewhere so I preferred to create this issue instead of opening a pull request, I hope this is ok!
After updating to Kirby 3.7 and k3-image-clip 3.1, I started seeing an error message in all blocks where I use Image Clip:
Argument 1 passed to mullema\File::setClip() must be of the type array, null given, called in /site/site/plugins/k3-image-clip/fieldMethods/toImages.php on line 38
I could fix the error message by passing an empty array instead of null to setClip on the toImages method, line 38:
from
$clipfile->setClip($clip ?? null);
to$clipfile->setClip($clip ?? []);
I am not sure if this change has any repercussions elsewhere so I preferred to create this issue instead of opening a pull request, I hope this is ok!