From 52a58dcc7c808c44f77639feb44e8ee2c6af735b Mon Sep 17 00:00:00 2001 From: Ian Monroe Date: Wed, 14 Jan 2026 11:01:48 -0700 Subject: [PATCH] SOEOPS-798: add empty string check for spotlight quotes --- .../engineering_profile_helper.module | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/engineering_profile_helper/engineering_profile_helper.module b/modules/engineering_profile_helper/engineering_profile_helper.module index 3a0e2b0a..65aca221 100644 --- a/modules/engineering_profile_helper/engineering_profile_helper.module +++ b/modules/engineering_profile_helper/engineering_profile_helper.module @@ -86,6 +86,11 @@ function _engineering_profile_helper_trim_spotlight_quote(string $quote) { } function _engineering_profile_helper_modify_spotlight_quote_for_magazine(string $html): string { + // Return early if the HTML is empty to avoid DOMDocument ValueError in PHP 8.1+. + if (empty(trim($html))) { + return ''; + } + $doc = new DOMDocument(); // Load the HTML fragment without adding and