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

Unclosed resources? #2

Closed
i124q2n8 opened this issue Feb 28, 2015 · 1 comment
Closed

Unclosed resources? #2

i124q2n8 opened this issue Feb 28, 2015 · 1 comment

Comments

@i124q2n8
Copy link

If you hash an image by filename the hash function will create a resource that is never closed.

https://github.com/jenssegers/php-imagehash/blob/master/src/ImageHash.php#L36

public function hash($resource)
{
    $resource = is_resource($resource) ? $resource : $this->loadImageResource($resource);
    $hash = $this->implementation->hash($resource);
    return $hash;
}
@jenssegers
Copy link
Owner

Resources should now be closed in the last commit :)

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

2 participants