Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

内存限制,却未抛出异常 #16

Open
Mr-houzi opened this issue Aug 16, 2019 · 0 comments
Open

内存限制,却未抛出异常 #16

Mr-houzi opened this issue Aug 16, 2019 · 0 comments

Comments

@Mr-houzi
Copy link

在当前版本中,操作文件过大和分辨率过大的文件,会达到内存限制,而造成程序中断,但并未抛出任何异常和错误。

经逐步排查后,在Image类构造方法中,调用imagecreatefromJpeg方法时造成了如下错误,

Allowed memory size of 52428800 bytes exhausted (tried to allocate 32768 bytes)  in
 ...... /topthink/think-image/src/Image.php on line 82

随后修改了memory_limit大小解决了问题。

Image类中的构造方法

但此处是不是应该抛出异常错误呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant