From c305d0a1acdfd79a1e5a0c929fd60234ecad9921 Mon Sep 17 00:00:00 2001
From: Seamus Lee <seamuslee001@gmail.com>
Date: Thu, 5 Dec 2024 08:27:04 +1100
Subject: [PATCH] Deal with the fact that options passed to fieldOptions might
 be NULL not an empty array

---
 docs/hooks/hook_civicrm_fieldOptions.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/hooks/hook_civicrm_fieldOptions.md b/docs/hooks/hook_civicrm_fieldOptions.md
index 2fac9dea..6ba84f44 100644
--- a/docs/hooks/hook_civicrm_fieldOptions.md
+++ b/docs/hooks/hook_civicrm_fieldOptions.md
@@ -6,7 +6,7 @@ Dynamically modify the option list for any field (including custom fields).
 
 ## Definition
 
-    hook_civicrm_fieldOptions(string $entity, string $field, array &$options, array $params): void
+    hook_civicrm_fieldOptions(string $entity, string $field, ?array &$options, array $params): void
 
 ## Parameters
 
@@ -15,7 +15,7 @@ Dynamically modify the option list for any field (including custom fields).
 -   **`$field`** (string): Name of field e.g. 'phone_type_id' (core field),
     'MyCustomGroup.MyCustomField' (custom field)
 -   **`&$options`** (array[]): Array of option arrays to modify by-reference
-    (format may be different on older versions, see legacy notes below).
+    (format may be different on older versions, see legacy notes below). It is possible tha this might actually be NULL rather than an empty array
 -   **`$params`** (array): Array of contextual settings and values:
       - `context` (string): Always 'full' (except for older versions, see legacy notes below)
       - `values` (array): Array of entity values, e.g. `['contact_type' => 'Individual']` (**warning**: may contain raw user input)
-- 
GitLab