bugfix earlyaccess code not present

This commit is contained in:
2017-09-09 10:44:49 +10:00
parent 461c6b1053
commit a7d24fb16c

View File

@@ -1393,8 +1393,11 @@ function _booking_details_email_summary($node) {
//look up the actual code since the booking_person node available at this time only has the primary key for that table
$earlyaccess_query = db_query("SELECT booking_earlyaccess_code FROM {booking_earlyaccess_codes} where cid = :code",
array(':code' => $node->booking_earlyaccess_code_id))
->fetchObject();
$rows[] = t('Early Access Code: !code', array('!code' => $earlyaccess_query->booking_earlyaccess_code));
->fetchObject();
//only add the row if there was a result returned
if ($earlyaccess_query) {
$rows[] = t('Early Access Code: !code', array('!code' => $earlyaccess_query->booking_earlyaccess_code));
}
}
/*