From 8c29c5b163a234abc3272eeda38685534ab515c2 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Mon, 6 Apr 2020 15:14:54 +0100 Subject: [PATCH] Throw exception if schema is not set --- Civi/Token/TokenProcessor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Civi/Token/TokenProcessor.php b/Civi/Token/TokenProcessor.php index 1d251a23ce8a..83ed1c7ccc92 100644 --- a/Civi/Token/TokenProcessor.php +++ b/Civi/Token/TokenProcessor.php @@ -135,6 +135,9 @@ public static function getEntityTableToSchemaMapping($entityTable) { * @param array $context */ public function __construct($dispatcher, $context) { + if (!isset($context['schema'])) { + throw new \CRM_Core_Exception('Missing required parameter "schema" in TokenProcessor'); + } $this->dispatcher = $dispatcher; $this->context = $context; }