- Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The Image::fromString method fails when processing PNG files due to infinite recursion.
The method attempts to call PNG::fromString($string) to create a PNG object. However, the PNG class does not implement its own fromString method and inherits from the Image class. This absence leads to infinite recursion, which will continue until the PHP memory limit is exhausted.
Error message
Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... bytes) in ... Steps to Reproduce:
Warning: will exhaust all memory assigned to PHP
use CSD\Image\Image; $string = \file_get_contents(__DIR__ . '/Fixtures/nometa.png'); $image = Image::fromString($string); I will submit a PR for this.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working