Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When a user doesn't have a subscription, you get a warning when you visit the profile page because $substitution isn't an array....
case 'view':
//Display role expirations
$show_expirations = variable_get('uc_roles_default_show_expiration',TRUE);
if ((user_access('view all role expirations') || ($user->uid == $account->uid && $show_expirations)) && $user->uid) {
$user_expirations = db_query("SELECT * FROM {uc_roles_expirations} WHERE uid = %d",$account->uid);
$items = array();
while ($expiration = db_fetch_object($user_expirations)) {
$substitution = array('!role_name' => _get_role_name($expiration->rid), '!date' => format_date($expiration->expiration,'small'));
$items[$expiration->rid.'_expiration'] = array(
'title' => strtr(variable_get('uc_roles_default_expiration_title', uc_get_message('uc_roles_user_expiration_title')), $substitution),
'value' => strtr(variable_get('uc_roles_default_expiration_message', uc_get_message('uc_roles_user_expiration_message')), $substitution),
'class' => 'member',
);
}
return array(strtr(variable_get('uc_roles_default_expiration_header', uc_get_message('uc_roles_user_expiration_header')), $substitution) => $items);
}
break;
..... Something is up with this.
Comments
Comment #1
RobLoachIf the IF statement is skipped, $substitution is not initialized.
Comment #2
Shawn Conn CreditAttribution: Shawn Conn commentedFix has been committed, expect to see it the beta 2 release.