添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The getimagesize throws exeption when used with CloudAssets module.

When uploading completes a error message as this shows in the upload field:
Object->__call(): the method 'parent' does not exist on 'Image'

The image get saved on the server and if you have configured the upload field to overwrite existing a second upload will go through and work fine.

Wrapping a try-catch around getImagesize in ImageOptimiserService::optimiseImage [43] fixes the issue.
E.g like this:
try { list($width, $height, $type, $attr) = getimagesize($filename); } catch (Exception $e) { $this->logger->error( "Unable to get image size.", array( 'exception' => $e ) ); }

I can create a pull request if this looks ok?