Closed (won't fix)
Project:
Invitation Voucher
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2009 at 17:47 UTC
Updated:
30 Jan 2013 at 22:19 UTC
In function invvoucher_validate:
For some i have empty results with with $r = mysql_fetch_array
I had to change to db_fetch_array. This works for me
function invvoucher_validate($code) {
$r = db_fetch_array(db_query("SELECT * FROM {invvoucher} WHERE code = '%s'", $code));
if (!empty($r)) {
if ($r['date_exp'] < time()) {// exp_date
form_set_error('invvoucher_response', t('The code you entered has expired.'));
return 0;
}
if ($r['reg_count'] == 0) { //quantity
form_set_error('invvoucher_response', t('The code you entered can be used no more.'));
return 0;
}
if ($r['code'] == $code) {
return 1;
}
}
form_set_error('invvoucher_response', t('The code you entered is incorrect.'));
return 0;
}
Comments
Comment #1
dear_anton commentedNice!
I'll check it as soon as possible :)
Great thanks!
Comment #2
duaelfrThis version of Invitation Voucher is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.