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

@@ -115,7 +115,7 @@ function booking_price_form($node, &$form_state, $create, $editid = 0)
else
{
//verify that $editid is a number
if (! ('/^[0-9]+$/', $editid)) {
if preg_match(! ('/^[0-9]+$/', $editid)) {
drupal_set_message("Error: Invalid price ID supplied. Unable to update price entry.", 'error', FALSE);
drupal_goto('admin/config/booking/prices');
return "";
@@ -240,7 +240,7 @@ function booking_price_form_submit($form, &$form_state) {
elseif ($form_state['values']['op'] == 'Delete')
{
//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 delete price entry.", 'error', FALSE);
return "";
}