I receive the following errors when creating a new page when signup is automatically disabled.

warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /path/to/drupal/sites/all/modules/signup_status/signup_status.module on line 844.
warning: Invalid argument supplied for foreach() in /path/to/drupal/sites/all/modules/signup_status/signup_status.module on line 552.

I am running this on mysql 5 and php 5.2.

CommentFileSizeAuthor
#5 signup_status_dbfetch.patch659 byteswestwesterson

Comments

jrbeeman’s picture

Status: Active » Postponed (maintainer needs more info)

This should be fixed with the latest commit (http://drupal.org/cvs?commit=93730). Give it a shot and let me know, though, as I'm having trouble recreating the issue. I won't mark this as fixed until I hear back.

westwesterson’s picture

I get the same error, but on a different line.
warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/sos/wwwroot/scsaveourshores.info/sites/all/modules/signup_status/signup_status.module on line 912 949.

the invalid arguement error is gone though.

Correction: These errors still show up on the signup status settings page:
warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /path/to/drupal/sites/all/modules/signup_status/signup_status.module on line 949.
warning: Invalid argument supplied for foreach() in /path/to/drupal/sites/all/modules/signup_status/signup_status.module on line 137.

westwesterson’s picture

Don't know if this will help, but on php seems finicky about mysql_fetch_object() and null or zero values.
http://us.php.net/mysql_fetch_object is chuck full of posts relating this, especially in php 5.2 and later. Maybe if we didn't use mysql_fetch_object() and used db_query instead. mysql_fetch_object() probably wouldn't work too well if someone were to port the module to postgre sql anyway.

westwesterson’s picture

i have now confirmed this on two separate machines. I don't know if this is the same issue, but status codes do not show up on the admin/settings/signup_status page.

westwesterson’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new659 bytes

this patch got rid of the errors for me.

jrbeeman’s picture

Ah, of course - jeez... not sure why I was using mysql_fetch_object. Brain fart. Thanks for the patch. It's committed as of http://drupal.org/cvs?commit=93830

jrbeeman’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.