Fix preg_match fail

This commit is contained in:
2014-12-01 23:06:39 +11:00
parent 57a7704e62
commit 51bc775664
13 changed files with 38 additions and 38 deletions

View File

@@ -9,7 +9,7 @@ function booking_travel_page() {
$return_array = array();
//verify that arg(1) is a uuid
if (! ('/^[0-9A-Fa-f\-]+$/', arg(1))) {
if (! preg_match('/^[0-9A-Fa-f\-]+$/', arg(1))) {
//parameter from url is not what we were expecting
drupal_set_message("Error: Invalid session ID supplied. Please use the contact us form to let us know.", 'error', FALSE);
return "";
@@ -418,7 +418,7 @@ function travel_form_submit($form, &$form_state) {
//watchdog('booking', 'Submitting travel form: @info', array('@info' => var_export($values, TRUE)));
//check that $values['personid'] is a number
if (! ('/^[0-9]+$/', $values['personid'])) {
if (! preg_match('/^[0-9]+$/', $values['personid'])) {
//parameter from url is not what we were expecting
drupal_set_message("Error: Invalid form data supplied. Please use the contact us form to let us know.", 'error', FALSE);
return "";