Fix preg_match fail
This commit is contained in:
@@ -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 "";
|
||||
|
Reference in New Issue
Block a user