php-qrcode-detector-decoder icon indicating copy to clipboard operation
php-qrcode-detector-decoder copied to clipboard

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

Open tasugo opened this issue 2 years ago • 2 comments

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

tasugo avatar Aug 13 '22 18:08 tasugo

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

GenieTim avatar Nov 23 '22 09:11 GenieTim

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.

webdeveloper100 avatar Apr 16 '24 09:04 webdeveloper100