From c1a61befa38be6561222d5d91005cbb05a2953c0 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 30 Jan 2020 10:54:11 -0500 Subject: [PATCH] API Kernel - move params check to v3 where it's relevant --- Civi/API/Kernel.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Civi/API/Kernel.php b/Civi/API/Kernel.php index 87f7783679..9aaa03a274 100644 --- a/Civi/API/Kernel.php +++ b/Civi/API/Kernel.php @@ -162,12 +162,11 @@ class Kernel { */ public function boot($apiRequest) { require_once 'api/Exception.php'; - - if (!is_array($apiRequest['params'])) { - throw new \API_Exception('Input variable `params` is not an array', 2000); - } switch ($apiRequest['version']) { case 3: + if (!is_array($apiRequest['params'])) { + throw new \API_Exception('Input variable `params` is not an array', 2000); + } require_once 'api/v3/utils.php'; _civicrm_api3_initialize(); break; -- 2.25.1