warning: Invalid argument supplied for foreach() in /srv/web/staging/emberhalasz.hit.hu/sites/all/modules/signup_status/modules/signup_status_limit/signup_status_limit.settings.inc on line 150.
warning: Invalid argument supplied for foreach() in /srv/web/staging/emberhalasz.hit.hu/sites/all/modules/signup_status/modules/signup_status_limit/signup_status_limit.settings.inc on line 195.This warning also appears on page /node/*/signups/settings when i save it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 596332-2.signup_status_limit_warnings_for_no_codes.patch | 2.48 KB | dww |
Comments
Comment #1
dwwYup, I can reproduce that on a site without any status codes defined. If you enable signup_status and signup_status_limit, you should define some status codes. ;) But, if you don't, it shouldn't throw PHP warnings. So yeah, this is a bug, and it should be a pretty easy fix...
Comment #2
dwwLike so. In addition to preventing the PHP warnings, I also added some form validation so people don't try to save a bogus configuration of per-status limits when there are no status codes.
Comment #3
kardave commentedAll right!
I didn't know it would appear if i start really using status codes :)
Thanks your quick answer and solution!
I applied the patch, it works great now.
Dave
Comment #4
dwwCommitted to HEAD. Thanks for the review and testing.