When the server PHP memory limit is set to -1 (i.e. Unlimited), ImageAPI GD reports an error at admin/reports/status saying the memory limit should be increased. (system.module used to do this as well, but has since been changed in Drupal 6 to correctly recognize a memory limit of -1.) The attached patch modifies imageapi_gd_requirements() to recognize -1 as being sufficient memory. The new code is a modified version of the code that already exists in system.install to make this same test.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | d6_imageapi_gd.install.patch | 726 bytes | tr |
| #4 | d7_imageapi_gd.install.patch | 726 bytes | tr |
| #2 | d6_imageapi_gd.install.patch | 568 bytes | tr |
| #2 | d7_imageapi_gd.install.patch | 570 bytes | tr |
| imageapi_gd.install.patch | 1.46 KB | tr |
Comments
Comment #1
drewish commentedAh I wasn't aware that -1 was a valid memory limit. Just double checked the PHP docs to be sure. The only thing I'd change it to preserve the current behavior of only listing the requirement when there's a problem. That page is noisy enough as it is so I'd rather avoid adding more items to it.
Comment #2
tr commentedHere you go. As a bonus, I also created a patch to address this same issue in 7.x-1.x-dev. I have tested both, of course.
Comment #3
drewish commentedLooks really good. If you had one second to just add a comment that -1 means unlimited memory then those are totally RTBC.
Comment #4
tr commentedAdded comment, re-rolled patches:
Comment #5
drewish commentedgreat, thanks a bunch. committed to HEAD and DRUPAL-6--1