Skip to content

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

@Mr-houzi

Description

@Mr-houzi

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

经逐步排查后,在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类中的构造方法

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions