From 3a9c06e19a757a43748ffa25e784690b5ee1c541 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 1 Dec 2014 23:08:40 +1100 Subject: [PATCH] more preg_match fixes --- booking.confirm.inc | 2 +- booking.prices.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/booking.confirm.inc b/booking.confirm.inc index 5b3cb3a..280e634 100644 --- a/booking.confirm.inc +++ b/booking.confirm.inc @@ -142,7 +142,7 @@ function booking_confirm_page() { array('!fee' => $person->booking_price)); //watchdog('booking', 'Partner name "@info"', array ('@info' => var_export($person->booking_partner_name, TRUE))); - if (('/^(\w*?)\s+(\w*)/', $person->booking_partner_name, $matches)) + if (preg_match('/^(\w*?)\s+(\w*)/', $person->booking_partner_name, $matches)) { watchdog('booking', 'Spouse checking. Firstname: "!first", surname "!last"', array ('!first' => $matches[1], '!last' => $matches[2])); diff --git a/booking.prices.inc b/booking.prices.inc index 7c368bd..1c06293 100644 --- a/booking.prices.inc +++ b/booking.prices.inc @@ -259,7 +259,7 @@ function booking_price_form_submit($form, &$form_state) { } else { //verify that booking_pid is a number - if (! ('/^[0-9]+$/', $values['booking_pid'])) { + if (! preg_match('/^[0-9]+$/', $values['booking_pid'])) { drupal_set_message("Error: Invalid price ID supplied. Unable to update price entry.", 'error', FALSE); return ""; }