From 2c2317159aee0dae93d92e1dcf2f04b581946e6b Mon Sep 17 00:00:00 2001 From: Jen Lampton Date: Fri, 13 Oct 2023 16:19:22 -0700 Subject: [PATCH] Prevent PHP warning in api_search.module Fixes https://github.com/backdrop-contrib/api/issues/8 --- api_search/api_search.module | 1 + 1 file changed, 1 insertion(+) diff --git a/api_search/api_search.module b/api_search/api_search.module index a603375..a36e30b 100644 --- a/api_search/api_search.module +++ b/api_search/api_search.module @@ -100,6 +100,7 @@ function api_search_api_updated($dids) { */ function api_search_url_outbound_alter(&$path, &$options, $original_path) { $matches = array(); + $path = is_null($path) ? '' : $path; if (preg_match('|^node/(\d+)$|', $path, $matches)) { $nid = (int) $matches[1]; if ($nid > 0) {