Don't report error at admin/reports/status when PHP memory limit set to -1 (Unlimited)
TR - April 30, 2009 - 20:46
| Project: | ImageAPI |
| Version: | 6.x-1.x-dev |
| Component: | ImageAPI GD |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.
| Attachment | Size |
|---|---|
| imageapi_gd.install.patch | 1.46 KB |

#1
Ah 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.
#2
Here 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.
#3
Looks really good. If you had one second to just add a comment that -1 means unlimited memory then those are totally RTBC.
#4
Added comment, re-rolled patches:
#5
great, thanks a bunch. committed to HEAD and DRUPAL-6--1
#6
Automatically closed -- issue fixed for 2 weeks with no activity.