Skip to content
Snippets Groups Projects
Commit f3a27f08 authored by lobo's avatar lobo
Browse files

CRM-12718

----------------------------------------
* CRM-12718:  in_array() expects parameter 2 to be array in IDS.php
  http://issues.civicrm.org/jira/browse/CRM-12718
parent 32370804
No related branches found
No related tags found
No related merge requests found
......@@ -254,10 +254,16 @@ class CRM_Core_IDS {
$session = CRM_Core_Session::singleton();
$session->reset(2);
$msg = ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting');
$path = implode('/', $args);
if ($path == in_array("civicrm/ajax/rest", "civicrm/api/json")) {
require ("api/v3/utils.php");
$error = civicrm_api3_create_error(ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting'),
if (in_array(
$path,
array("civicrm/ajax/rest", "civicrm/api/json")
)) {
require_once "api/v3/utils.php";
$error = civicrm_api3_create_error(
$msg,
array(
'IP' => $_SERVER['REMOTE_ADDR'],
'error_code' => 'IDS_KICK',
......@@ -269,7 +275,7 @@ class CRM_Core_IDS {
echo json_encode($error);
CRM_Utils_System::civiExit();
}
CRM_Core_Error::fatal(ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting'));
CRM_Core_Error::fatal($msg);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment