Summary:
Fatal error on date type fields
Detailed Description:
When trying to submit a registration form with a date type field, I got a fatal
error about cge_param::get_date complaining about the "$key" variable type which
is supposed to be: "areinf"
I changed CGExtensions/lib/class.cge_param.php line 242 from :
public static function get_date($params,areinf $key,$dflt = null)
To :
public static function get_date($params, $key, $dflt = null)
(removed "areinf" for which I didn't find any other reference in the code, so
maybe a typo error?)
Then, in CGFEUReg, I got another error related to the with() method.
In lib/class.RegistrationManager.php line 248 I changed:
case 8: // date
if( cge_param::exists($formdata, $field->name.'Month') ) {
$user = $user->with(cge_param::get_separated_date($formdata,
$field->name));
} else {
$user = $user->with(strtotime(cge_param::get_date($formdata,
$field->name)));
}
break;
}
To :
case 8: // date
if( cge_param::exists($formdata, $field->name.'Month') ) {
$user = $user->with($field->name,
cge_param::get_separated_date($formdata, $field->name));
} else {
$user = $user->with($field->name,
strtotime(cge_param::get_date($formdata, $field->name)));
}
break;
}
> changed the first param of the "with" functions calls