From d4da7d580d44ec5786f545f8feeb9fe480d247e8 Mon Sep 17 00:00:00 2001 From: Luke Stewart Date: Fri, 18 Mar 2022 13:09:38 +1300 Subject: [PATCH] Fixes fatal error - function doesn't exist As per https://developer.wordpress.org/reference/functions/is_favicon/ this function was only added in 5.4.0 meaning CiviCRM now breaks if installed on a site running Wordpress < 5.4.0 --- includes/civicrm.basepage.php | 2 +- includes/civicrm.shortcodes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/civicrm.basepage.php b/includes/civicrm.basepage.php index b6246cf..147d38e 100644 --- a/includes/civicrm.basepage.php +++ b/includes/civicrm.basepage.php @@ -322,7 +322,7 @@ public function basepage_handler($wp) { } // Bail if this is a Favicon request. - if (is_favicon()) { + if (function_exists('is_favicon') && is_favicon()) { return; } diff --git a/includes/civicrm.shortcodes.php b/includes/civicrm.shortcodes.php index 7a54189..616faf4 100644 --- a/includes/civicrm.shortcodes.php +++ b/includes/civicrm.shortcodes.php @@ -109,7 +109,7 @@ public function prerender($wp) { } // Bail if this is a Favicon request. - if (is_favicon()) { + if (function_exists('is_favicon') && is_favicon()) { return; }