From a7d24fb16c85ffd1069bfb357bfe0f1aff68e5c6 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Sat, 9 Sep 2017 10:44:49 +1000 Subject: [PATCH] bugfix earlyaccess code not present --- booking.helper.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/booking.helper.inc b/booking.helper.inc index 375af2b..2be71f5 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -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)); + } } /*