diff --git a/reservation.inc b/reservation.inc index 45736a0..fa48c12 100644 --- a/reservation.inc +++ b/reservation.inc @@ -271,7 +271,7 @@ function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInte */ function reserve_form_reserve_reservation_delete_form_alter(array &$form, FormStateInterface $form_state) { // Retrieve an array which contains the path pieces. - $refer_path = $_SERVER[HTTP_REFERER]; + $refer_path = $_SERVER["HTTP_REFERER"]; $path_args = explode('/', $refer_path); $month = $path_args[6]; diff --git a/reserve.series.inc b/reserve.series.inc index eb2681d..4edb9d6 100644 --- a/reserve.series.inc +++ b/reserve.series.inc @@ -37,7 +37,7 @@ function reserve_reserve_reservation_insert($entity) { $rid = $entity->reservable_id->getString(); $rtype = $entity->reservable_content_type->getString(); $ebundle = $rtype . '.' . \Drupal::entityTypeManager() - ->getStorage($rtype)->load($id)->bundle(); + ->getStorage($rtype)->load($rid)->bundle(); $day = date('l', strtotime($start)); $msg = '';