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

"PHP Memory Limit does not allow pixel export." exception when the memory limit is in fact unlimited #133

Open
tasugo opened this issue Aug 13, 2022 · 2 comments

Comments

@tasugo
Copy link

tasugo commented Aug 13, 2022

When there is no memory limit set, or it is set to -1 (unlimited), the instantiation of IMagickLuminanceSource throws a RuntimeException("PHP Memory Limit does not allow pixel export.") complaining about it, because it wrongfully thinks the limit is not enough.

This is due to the fact that in the checking method, a call to kmgStringToBytes performs a substr without taking into account the negative value, or the - sign.

I'm creating a PR that fixes this

@GenieTim
Copy link
Contributor

I think this should be fixed in the current version, 2.0.2

@webdeveloper100
Copy link

webdeveloper100 commented Apr 16, 2024

Hello, I have the exact problem on a production server.
PHP Memory Limit does not allow pixel export. khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php (34)
I had a look into the vendor file, I can't see the changes proposed in the PR #134 and I have version 2.0.2 installed.

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

Successfully merging a pull request may close this issue.

3 participants